 Now what's up guys? My name is Michael and welcome to my YouTube channel today. You know what we're gonna do We're gonna do another lead code challenge is called number of recent calls Write a class called recent counter to count recent requests It has only one method ping where t represents some time in milliseconds Return the number of pings that must that have been made from 3,000 milliseconds ago until now any ping that is within t-3,000 Up to t will count including the current ping it is guaranteed that every call to ping uses Exactly a strictly larger value of t than before So if you're given a recent counter ping ping ping ping ping inputs are empty One a thousand three thousand one three thousand two You would get the ones that are between three thousand Is gonna be null right one to Because of three thousand one and three thousand two and three three and the three three represents What is three three represent 33 okay, I don't know what that means, but It's actually they just want any ping with time t minus three thousand to two to t will count so Okay, so This is actually a really bad question because I don't understand what they meant, but I did this already and Basically all you have to do I'll type it up As you just have a queue and then you add whatever value t is into the queue Anything that's less than t minus three thousand you would just remove it and you return the size Okay, so I'll just type that up with you guys So you would have a queue and This is gonna be called. I don't know New queue Okay, if you guys wondering why my voice is like this, I'm kind of sick right now, so essentially they want They said they want to have Return number things I've been made for three thousand seconds ago until now Is any ping then time t to minus three thousand to t all you just have to do is new queue that push We push t on it then while new queue While it's not yeah While the front Is less than T minus three thousand so this is checking if if the front's value is less than The current t that we added minus three thousand Right, then we're gonna move it from the queue and then we return the ones that actually have We return the ones that are actually between t t minus two thousand and t so that's basically how you would do it So I'll do new queue Pop and then we return new queue dot size Okay, this is basically how you do it Yeah, this is a bad question. It's poorly written so Yeah, that's how you do it That's basically it Rate comm subscribe. I hope you guys enjoy this short video. I'm kind of sick right now I'm trying to get these these first 30 solutions out really quickly So then I could actually do like actual problems with you guys to see how how long I would take to do them Because right now I'm basically doing problems. I already have done already and I don't want to just explain the solution I want to see I want you I want to showcase Me actually doing the solutions with you guys. All right, so yeah rate comp subscribe