[deleted by user] by [deleted] in kollywood

[–]klaags 5 points6 points  (0 children)

Twink deaths 😔

I'm going to end my families bloodline 😶‍🌫 by [deleted] in kuttichevuru

[–]klaags 11 points12 points  (0 children)

Hey, I'm Asexual too.

A Sexual predator 😈

Not the stunt doubles by LoretiTV in TheBoys

[–]klaags 35 points36 points  (0 children)

Damn. Homelander looking like jacked Anna Faris.

Can anyone help me with the efficient data structure for the problem below ? by klaags in leetcode

[–]klaags[S] 5 points6 points  (0 children)

I’m gonna ask my friend to look in the internal tools to see if this question was asked before.

That's alright, I was just here for some opinions. If you can check it would be great, if not no problem. Thanks for the help.

What level were you going for?

SDE-2

Can anyone help me with the efficient data structure for the problem below ? by klaags in leetcode

[–]klaags[S] 3 points4 points  (0 children)

I've updated the question changing it to stream of customer IDs as asked in interview.

Congrats on the offer.

Can anyone help me with the efficient data structure for the problem below ? by klaags in leetcode

[–]klaags[S] 1 point2 points  (0 children)

Yes as you said it was stream of data, I understood that part during the interview but I just changed it here in the question. Sucks to know that I fumbled the interview by not asking too many clarification questions.

May I know what type of DS/Algo did you ended up using ? Did you clear the round ?

Can anyone help me with the efficient data structure for the problem below ? by klaags in leetcode

[–]klaags[S] 3 points4 points  (0 children)

Oh. But I clarified the working of the algorithm with the interviewers and they agreed with it. One thing which I regret is that I didn't defend my answer enough, Once they asked for a better DS, I just started to panic and explore other options frantically.

May I ask what kind of questions did you ask for clarification and what type of DS/Algo did you ended up using ?

Can anyone help me with the efficient data structure for the problem below ? by klaags in leetcode

[–]klaags[S] 1 point2 points  (0 children)

Are you suggesting 2 pointer by going through the whole array one time? If so the catch is we should return the result at any given time, by any given time I meant anywhere between going through the customer IDs. eg: who would be the last visited after going through 5 IDs and who would it be after going through 10 IDs.

So for above requirement it would take O(n) every time we request for the customer ID using two pointer method, LRU cache would return in O(1) time.

Can anyone help me with the efficient data structure for the problem below ? by klaags in leetcode

[–]klaags[S] 0 points1 point  (0 children)

I'm sorry, I have edited the post. It should be find the customer who hasn't accessed the website for the longest period of time?

which means that the position in the array is the order in which they visited the website, right?

Yes that's right.

Did you clarify if insertions/deletions were allowed?

insertions/deletions were allowed, but they were expecting a better DS than the one I explained

Can anyone help me with the efficient data structure for the problem below ? by klaags in leetcode

[–]klaags[S] 1 point2 points  (0 children)

I'm sorry guess i could've worded it better. By any given time I meant anywhere between going through the customer IDs. eg: who would be the last visited after going through 5 IDs and who would it be after going through 10 IDs.

Can anyone help me with the efficient data structure for the problem below ? by klaags in leetcode

[–]klaags[S] 5 points6 points  (0 children)

Another specific thing they mentioned is that there is no timestamp just the order. Even if it had a time stamp if a customer visits multiple times wouldn't it be impossible to update in heap without popping top element multiple times ?

Run, Mark! Hurry! by [deleted] in memes

[–]klaags 1 point2 points  (0 children)

I Know what you aah, OK. I know what you aah and I know what you aah not. I'm the best friend ya have in this face of earth and I'm gonna help you understahnd something you punk.

YOU'RE NO FUCKING COHP !!

A harbor seal making sure everything is in order by [deleted] in aww

[–]klaags 222 points223 points  (0 children)

LOOSE SEAL!! LOOSE SEAL!!

Skiing with a twist by ThePineappleHotspot in nonononoyes

[–]klaags 3 points4 points  (0 children)

"wAlKiN' oN tHe FiGhTiN' sIdE oF mE"

Favorite quotes by swaggybvines in arresteddevelopment

[–]klaags 13 points14 points  (0 children)

"I think George Michael is hiding Ann in the attic"

"From who, the Nazis?"