GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — leetcode/python/933_Number_of_Recent_Calls.py at master · qiyuangong/leetcode Expand file tree/ Copy path933_Number_of_Recent_Calls.pyMore file actions 19 lines (15 loc) · 431 Bytes / Copy path933_Number_of_Recent_Calls.pyFile metadata and controls19 lines (15 loc) · 431 Bytes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 class RecentCounter(object): def __init__(self): self.queue = [] def ping(self, t): """ :type t: int :rtype: int """ self.queue.append(t) while self.queue and self.queue[0] < t - 3000: self.queue.pop(0) return len(self.queue) # Your RecentCounter object will be instantiated and called as such: # obj = RecentCounter() # param_1 = obj.ping(t) |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |