You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
classRecentCounter {
public:
queue<int> q;
RecentCounter() {
}
intping(int t) {
q.push(t);
while (q.front() < t - 3000) {
q.pop();
}
return q.size();
}
};
/** * Your RecentCounter object will be instantiated and called as such: * RecentCounter* obj = new RecentCounter(); * int param_1 = obj->ping(t);*/
queue의 FIFO성격을 활용한 ping, 즉 서버에 관한 간단한 문제
이런 문제가 더 많아지면 좋겠다.
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: