leetcodeSolution to some Leetcode problems written in C++ |
git clone git://git.dimitrijedobrota.com/leetcode.git |
Log | Files | Refs | README | LICENSE |
0933.cpp (184B)
0 class RecentCounter {
1 queue<int> q;
3 public:
4 int ping(int t) {
5 q.push(t);
6 while (t - 3000 > q.front())
7 q.pop();
8 return q.size();
9 }
10 };