🚀 neetcode.io/ - Get lifetime access to all current & future courses I create! Btw this is the question I asked: leetcode.com/problems/insert-delete-getrandom-o1/ We actually solved it on the channel here: ruclips.net/video/j4KwhBziOpg/видео.html
@@jersynumber18the code in this interview seems to be more pseudo code. When writing actual code, they will mostly have to to use hashset since Set is usually an interface in many languages and HashSet is one of the implementations
I find it funny that when he googled for how to get an arbitrary element from a set, he actually found Java code, and pasted it into his Python solution. And NeetCode is just like "great".
Hey Neetcode! I got the exact same question on my Adobe interview two days ago. Luckily I have been practicing from your collection of questions last few months and never missed any of your videos. I bagged my offer today!! You have literally made this happen for me. Can’t thank you enough for this day!
Hey man. I have been preparing for coding interviews for a month now. I am a self taught coder who is passionate about coding especially in AI and machine learning fields. I have just started coding for 3 months with hands on projects of over 50+ as I have quit my previous job and dedicated my full time learning coding. During the past weeks, I spent at least 4-5 hours a day on Leetcode and I have completed almost 100 problems. Now then I have started watching coding interview videos, and I feel that problems in most mock interviews seem a little too easy. So I just wanted to know from people like you who have already experienced real interviews that how difficult are there real problems?
@@yatintyagi4366 wouldn't the if statement be more clear since the value isn't in the set to begin with? Thus if changed in the future... it'll still run correctly?
please record more of these google mock interviews!! this questions seem so easy initially, but watching how frypan is talking aloud and saying his thought process makes me realize how the little details he says is actually valuable to you (neet) as the interviewer. now i realize why i failed my interviews so much
Watch this i was thinking maybe we could store in an array..but wont store in array initially..we would then use a function to check the array if the value was already store there.. if yes then use the value position to store the new figure.. if no then use the new value as storage.. I would also use a function to get a random number using the array limitation then use that random number to return a value from set.
@@danielbrown7534 searching in an array is O(n). Unless the array is sorted, in which case you can use binary search and it becomes O(logn). But to be able to always search in O(logn) you have to maintain the sorted order of the array at all times, which means your insertion becomes O(n) (find the correct index to insert at to maintain sorted order: O(logn), insert and then shift all of the elements to the right of it: O(n)) and your removal is now also O(n) (typical array removal). The point of this question is to kind of juggle all of these limitations. Every time you choose a data structure to optimize one of the operations, something else becomes more expensive. Nothing is free. This is why the trick is to use different data structures simultaneously, each good at different operations, and figure out how to make them work together to create an interface where all three of the exposed operations are O(1). But even this isn't free, as you're now basically doubling the memory you use (still O(n) space tho).
Things I'm starting to realize every developer needs to do during an interview. Ask tons of questions before even thinking about coding, even if they seem obvious. If the easiest way to think of a question is in one-time complexity odds are they are hinting at the complexity they want in the description of the question.
Gah, what people watching this might be missing out on is the anxiety, and the difficulty between coding and talking through the code. I sat here correcting him as he went, but also remembered how much I stumbled over trivial stuff. It's so nerve racking.
There were 4 people in my coding interview a few months ago. They were quite friendly with me, though. I had to code C++ in MS Word, which was a pain the neck. Even the easiest questions become hard because of tension. In addition to that, time flies when you are under pressure because you are trying to come up with an answer in your head and trying to word it properly.
Thanks so much @NeetCode for doing this. I think this video is pretty realistic (except for the way @FryingPan talks 😂) compared to the other mock interview videos online! Helped me relate a lot being an interviewee. Looking forward to more such videos!! Keep inspiring with your good work 😃
Theres something neither of you caught. When you remove elements from the set that keeps track of indices and when there's only one element in the set, you are left with an empty set. What you want is to get rid of the map entry altogether. So you should check if it's the last element, and if it is, del that entry. Also, he mentions changing to a set instead of an array because when he chose the array first, he was using the first index and then he probably thought "wait.. now if I delete the first index I have to shift all the remaining ones to the left". Well actually you can simply use the last one instead of the first by using "pop", and so you can still use the array
@@massalkhii This actually isn't true. since we are only ever pushing values into the values array, the index of the last value in the value array will always be the last index in that values index array. This stays true whether there are duplicate last values or not. Using a set here isn't better really.
@@Biggyweezer69 I realized I was digging deep, while even the obvious case of having a duplicate of the last element, it raises an error (in the final code of the guy in the video)
17:55 When he realized what's the right way, and you see the smile, that's why we love programming. That's why ones, who think "I want to be a programmer because it means I get a lot of money" always fail. Whoever loves this, feel fun when programming is always the one who reaches his goal.
My man was coding in Python and searched how to get the first element of a set in Java. Genius. And he said it so confidently too: "I got it sir! I got it!" 39:25 😂 It's "next(iter(mySet))" by the way. And thank you for the video, it was really nice!
I would implement the Get(bool random, Enum input) first, then when implementing the Insert, pass each iteration to Get() with random false. If it returns a value then dont insert it as its duplicate. To get random you jusst need to set random to true. Then the remove is straight forward.
This is a really inspring mock interview. Learn a lot from this standard mock interview. Please upload more similar interviews including system design mock interview.
That's cool. I've learned a lot during the Mock test interview. Understand deeply the way the interviewer asked the candidate and the way of thinking to solve the problem.
Pro tip to people interviewing. Don’t talk like this guy. Don’t swear. Don’t quiz the interviewer. Finding the optimal solution is a must, but they’re also deciding if they want to work with you. Some crude banter can give the wrong signal, and there’s zero advantage to you in risking it. Be polite. Don’t be cocky. Every grading rubric has score around cultural and team fit. Just FYI.
Those sort of questions are a little bit odd, because the "reduce complexity" always boils down to the data structure behind and there basically a lot of useful stuff was already invented, so you wouldnt hire someone, who can recreate such a structure from scratch, because that's totally not part of the daily business.
Thank you, it was great! Just a heads-up, I’ve found a small bug. If you do the following: s = Store() s.insert(1) s.remove(1) s.remove(1) The issue arises because the check is only `if value not in self.map` but it should be `if len(self.map[value]) > 0` to correctly handle multiple removals.
But for real, if you act like him in an interview, how would the interviewer view that? Is he being cocky? Or is that confidence? I understand he’s being semi sarcastic because that’s his RUclips persona. But I know there are people who actually act like this in interviews and I wonder how it’s received by the interviewer.
in the 30:28, the follow up question is to allow array to store duplciate. The follow up seems to be simplified, in general, it may ask while allowing to store duplicate values, what is to make each number to has the same probility in getRandom(say 1,2,2,2,2,2,3), 1 and 2 and 3 has the same 1/3 probility to be returned.
I feel that moment when you said "do you really talk like this in real interviews" and he replied "what's wrong with how I talk" Your reaction was "nothing" 🤣🤣 I felt that man 🤣🤣
He should have been honest there! Judging from the comments he's kinda acting; but besides your ability to solve problems, it's also super important to be pleasant to work with. One can be funny and entertaining while staying humble and mindful.
I'm actually him during my interviews 😂😂 Its easy to figure out solution when you're not under pressure, but in actual interviews there's so many things that can happen and the anxiety can get to you and affect your performance.
Something important is the use of descriptive names for your variables, because in this case without any previous context you won’t figure out what’s the function of “map” or “values”variables.
thats actually a great point! I guess in this case what kind of variable names would you use? Bcuz i cant think of what to call them other than values either lol
Good parts: Asked good questions. Voiced thought process. Provided good test cases. Could recover from bugs. Could make use of hints. Solved the assignment. Not so good and red flags: Too focused on how to ace the coding part instead of making a good impression as a team player. Some unnecessary code. Raised voice and tried to school the interviewer to cope with pressure. Didn't act humble and didn't seem very interested in reflection after the interview, instead was more interested in competition and returning a "hard" question. Also foul language and improvable attitude and composure. Might be just acceptable in a youtube interview but would have been much better without that! Thanks to both for the video!
9:45 Being someone that first learned about lists in C, removing and adding was truly something, seeing this makes me have high hopes in my future coding career lol.
You mentioned that you don’t actually use Google docs for coding interviews? What do you use a Google IDE? How do you draw out solutions on a Google online interview?
it's not exactly "Google docs" but it's basically the same thing, just with syntax highlighting and no autocomplete (or there wasn't when I interviewed)
i'm not really sure about that but inserting in a hashmap, will, at some point, result in a reallocation of the elements, since under the hood you store the elements inside an array indexed using a hash function. Usually you allocate more space when you have the array half full or 3/4. A data structure with an array that has a little buffer and gets reallocated when half full will get you the same time complexity, i suppose. Also when deleting, yes, when you delete an element from the end of the array you don't need to push elements around to fill a void, but you still retain that memory. After some delete operations you would want to release that memory by realloc-ing everything in a smaller array and freeing the old memory.
The code in follow up has a bug... In the remove function, when the size of self.map[value] equals to zero, we need to delete the empty set like `del self.map[value]`. Otherwise, next remove call for same element will cause an error.
By the way, his original solution was great. We could still use a set, to insert and remove in O(1). As for the get_random method, he should have used 'random.randint(0, len(self.values)-1)' to get a random index and then get it using self.values[index].
So funny. I am still struggling with leetcode by just finishing the first 200. And I did not have much interview experience. The video makes me feel like we are all human beings.
I nearly fell off my chair at the comment that not having a way to turn off auto-caps was "not very inclusive". If I were the hiring manager that would have been a red flag moment.
There is an obvious bug when the value we are going to remove is equal to the last element in values list, in which case adding the index before removing will end up losing the index.
Haha, i dont think any interviewee would ask questions like that. It is obvious that its done by him on purpose to kinda make it more educational for the viewers
Would interviewers be more impressed if YOU implement methods like pop(), append(), iterator().next(), etc... and not use the already integrated ones? Nice video btw :)
Another important question that could have been asked is the range of possible values to be inserted, it can influence a lot the final solution complexity!
Saw this Video yesterday, got random recommendation and today i got this question on leetcode daily challenge question, i was shocked about it but the explanation was so good i did the question in one go
got my first interview on wednesday and this video equally relaxes and terrifies me 😅 Trouble is I cannot think aloud. I can think, then explain, but that takes more time. Hopefully not an issue, but we shall see 🤞
🚀 neetcode.io/ - Get lifetime access to all current & future courses I create!
Btw this is the question I asked: leetcode.com/problems/insert-delete-getrandom-o1/
We actually solved it on the channel here: ruclips.net/video/j4KwhBziOpg/видео.html
Yeah I'd like to see that 🤩
I became homeless. I am depressed
yeees
It seems only fair and right with the world. I mean if you prefer balance in the universe rather than chaos.
Hi, sorry isn't duplicate problems easily solved with sets, as this doesn't allow duplicates, and it's call is already random.
"If there is a problem, just throw a hashmap at it."
- someone really smart
Funny how true this is
@@subhrajyotisen7218 why not Hashset here ? until follow up question
@@jersynumber18the code in this interview seems to be more pseudo code. When writing actual code, they will mostly have to to use hashset since Set is usually an interface in many languages and HashSet is one of the implementations
@@jersynumber18 you need to store the index as the value.
Works all the time
I find it funny that when he googled for how to get an arbitrary element from a set, he actually found Java code, and pasted it into his Python solution. And NeetCode is just like "great".
😂
I 😂😂😂
😂😂😂😂😂😂😂😂😂
I didn't notice that, can anyone paste the timestamp. I watched the video twice still didn't see it
39:19@@tahashakeel
Hey Neetcode! I got the exact same question on my Adobe interview two days ago. Luckily I have been practicing from your collection of questions last few months and never missed any of your videos. I bagged my offer today!! You have literally made this happen for me. Can’t thank you enough for this day!
Hi, is adobe allowing remote work?
Congrats ma boi
Congrats nigg*
what collection of questions you are talking about? Neetcode 150?
Hey man. I have been preparing for coding interviews for a month now. I am a self taught coder who is passionate about coding especially in AI and machine learning fields. I have just started coding for 3 months with hands on projects of over 50+ as I have quit my previous job and dedicated my full time learning coding. During the past weeks, I spent at least 4-5 hours a day on Leetcode and I have completed almost 100 problems. Now then I have started watching coding interview videos, and I feel that problems in most mock interviews seem a little too easy. So I just wanted to know from people like you who have already experienced real interviews that how difficult are there real problems?
for python folks, removing an item from set, which isn't in the set , using remove() method will result in error, so use discard() method.
Just use pop
or just use an if statement
@@yatintyagi4366 wouldn't the if statement be more clear since the value isn't in the set to begin with? Thus if changed in the future... it'll still run correctly?
Agree smart move
@@danielsank2286 pop removes a random value from the set, not the required one
“In your real interviews, do you talk the same way..?” LMAO that is the question I wanted to ask lol
It was obviously a frank discussion between friends
@@pinecedar180 but you can be pretty frank just don't be unprofessional
I'm 5 min into the video and I wanted to ask that
@decomush do you think you're superior for being socially inept and not realizing these are 2 friends ?
@@WoWUndad not really, just a fair question to help out the guy
please record more of these google mock interviews!! this questions seem so easy initially, but watching how frypan is talking aloud and saying his thought process makes me realize how the little details he says is actually valuable to you (neet) as the interviewer. now i realize why i failed my interviews so much
Watch this i was thinking maybe we could store in an array..but wont store in array initially..we would then use a function to check the array if the value was already store there.. if yes then use the value position to store the new figure.. if no then use the new value as storage.. I would also use a function to get a random number using the array limitation then use that random number to return a value from set.
@@danielbrown7534 That wouldn't meet the time complexity requirements.
@@danielbrown7534 searching in an array is O(n). Unless the array is sorted, in which case you can use binary search and it becomes O(logn). But to be able to always search in O(logn) you have to maintain the sorted order of the array at all times, which means your insertion becomes O(n) (find the correct index to insert at to maintain sorted order: O(logn), insert and then shift all of the elements to the right of it: O(n)) and your removal is now also O(n) (typical array removal).
The point of this question is to kind of juggle all of these limitations. Every time you choose a data structure to optimize one of the operations, something else becomes more expensive. Nothing is free. This is why the trick is to use different data structures simultaneously, each good at different operations, and figure out how to make them work together to create an interface where all three of the exposed operations are O(1). But even this isn't free, as you're now basically doubling the memory you use (still O(n) space tho).
Things I'm starting to realize every developer needs to do during an interview. Ask tons of questions before even thinking about coding, even if they seem obvious. If the easiest way to think of a question is in one-time complexity odds are they are hinting at the complexity they want in the description of the question.
I just hate to ask questions for the sake of asking questions though...
@@MichaelButlerC frfrfr
@@MichaelButlerCyou’re going to have to do that during the actual job
Gah, what people watching this might be missing out on is the anxiety, and the difficulty between coding and talking through the code. I sat here correcting him as he went, but also remembered how much I stumbled over trivial stuff. It's so nerve racking.
True, IMHO I think he should ask all the possible questions. To ease the doubt.
There were 4 people in my coding interview a few months ago. They were quite friendly with me, though. I had to code C++ in MS Word, which was a pain the neck. Even the easiest questions become hard because of tension. In addition to that, time flies when you are under pressure because you are trying to come up with an answer in your head and trying to word it properly.
"i have ocd and this is pissing me off"
My interviewer: get tf out then 😊
This is the first time I watched a 40 minute video. Real fun, we want more of these!
Thanks so much @NeetCode for doing this. I think this video is pretty realistic (except for the way @FryingPan talks 😂) compared to the other mock interview videos online! Helped me relate a lot being an interviewee. Looking forward to more such videos!! Keep inspiring with your good work 😃
well did you get the job?
@@davidtran9455 😭
Been watching Mock interview sessions for a long time, but this is by far the most enjoyable session for my all time :)
Theres something neither of you caught. When you remove elements from the set that keeps track of indices and when there's only one element in the set, you are left with an empty set. What you want is to get rid of the map entry altogether. So you should check if it's the last element, and if it is, del that entry.
Also, he mentions changing to a set instead of an array because when he chose the array first, he was using the first index and then he probably thought "wait.. now if I delete the first index I have to shift all the remaining ones to the left". Well actually you can simply use the last one instead of the first by using "pop", and so you can still use the array
excellent observation
what if you want to remove the number first in the list, you can't use pop() instead?
It's remove by value, so it's worst-case linear time for an array.
@@massalkhii This actually isn't true. since we are only ever pushing values into the values array, the index of the last value in the value array will always be the last index in that values index array. This stays true whether there are duplicate last values or not. Using a set here isn't better really.
@@Biggyweezer69 I realized I was digging deep, while even the obvious case of having a duplicate of the last element, it raises an error (in the final code of the guy in the video)
This interview made me realize that I can do it too. Thanks, Neetcode
17:55 When he realized what's the right way, and you see the smile, that's why we love programming.
That's why ones, who think "I want to be a programmer because it means I get a lot of money" always fail. Whoever loves this, feel fun when programming is always the one who reaches his goal.
the last part you ask 'do you talk like this in real interview?' and then 'nothing' really make me laugh
The collab we waiting for..🔥
The only 2 coding channels i subscribed and getting that collab is awesome..
The snarky comments while Neetcode remained mute was hilarious
None of my coding interviews for internships have been anywhere near this easy
but the mock interviews from faang are - its a mock not a real assessment- its used to get a feel for the format and UMPIRE application
@@harryzhu Arent mocks meant to be harder than the potential interview? So you're more than prepared.
My man was coding in Python and searched how to get the first element of a set in Java. Genius. And he said it so confidently too: "I got it sir! I got it!" 39:25 😂
It's "next(iter(mySet))" by the way.
And thank you for the video, it was really nice!
I would implement the Get(bool random, Enum input) first, then when implementing the Insert, pass each iteration to Get() with random false. If it returns a value then dont insert it as its duplicate. To get random you jusst need to set random to true. Then the remove is straight forward.
This is a really inspring mock interview. Learn a lot from this standard mock interview. Please upload more similar interviews including system design mock interview.
That's cool. I've learned a lot during the Mock test interview. Understand deeply the way the interviewer asked the candidate and the way of thinking to solve the problem.
the collab i didnt know i need 😂 frying pan is too funny lol. Great hint from Neetcode too, just enough to nudge him into revelation
Can we get more interviews like this one? It was really helpful. Thanks!! 🙂
??
This guy is total tech lead material
I thought we were about to get a face reveal 😂
Maybe on part 2... lol
Seriously man..i so badly want to see neetcode.. in my mind he is like moriarty frm sherlock show... coz thats how brilliant neetcode is.😊😊😝
@@NeetCode Is Techlead in the thumbnail
Me too..neetcode, make it happen!
Neetcode looks like an angel for sure
That adding array to value for duplicate values was amazing, always had that doubt but I found the answer today. Thank you for the post
Hiring a cocky person is quite dangerous no matter how smart they are.
Frying pan is hilarious though he is not explicitly trying to make fun of the situation.
In the follow-up, you could have just chosen the last element from the list to swap self.map[value][-1] and used pop() to remove it after the swap.
There is no indexing in sets so self.map[value][-1] wouldt work and then he also pasted some wrong java code in
Pro tip to people interviewing. Don’t talk like this guy. Don’t swear. Don’t quiz the interviewer. Finding the optimal solution is a must, but they’re also deciding if they want to work with you. Some crude banter can give the wrong signal, and there’s zero advantage to you in risking it. Be polite. Don’t be cocky. Every grading rubric has score around cultural and team fit. Just FYI.
FUC.K
Im not sure if the rudeness was real or satirical. I’m not sure if being rude to the interviewer is a great strategy.
Language barrier maybe? But prob satire
theyre obviously friends
I find it pretty demoralizing how people are saying this is way too easy, I thought it was difficult
Those sort of questions are a little bit odd, because the "reduce complexity" always boils down to the data structure behind and there basically a lot of useful stuff was already invented, so you wouldnt hire someone, who can recreate such a structure from scratch, because that's totally not part of the daily business.
Thank you, it was great!
Just a heads-up, I’ve found a small bug. If you do the following:
s = Store()
s.insert(1)
s.remove(1)
s.remove(1)
The issue arises because the check is only
`if value not in self.map`
but it should be
`if len(self.map[value]) > 0`
to correctly handle multiple removals.
But for real, if you act like him in an interview, how would the interviewer view that? Is he being cocky? Or is that confidence? I understand he’s being semi sarcastic because that’s his RUclips persona. But I know there are people who actually act like this in interviews and I wonder how it’s received by the interviewer.
Assert your dominance. Instantly hired.
"I bet you didn't know that!" 🤦🏼♂️
@@FryingPan Should I raise the stakes by urinating on the interviewer's leg?
He ended up writing some pretty neat code so we can let it slide 😉
@@NeetCode yooooooo!! he said the thing!!
love the concept, if you need another person to mock interview I would be happy to do one. I am an ex Quant trader now studying for algo / CS jobs.
Are ya still down? :)
This was like actually really awesome. I felt like I was solving the problem with him!
in the 30:28, the follow up question is to allow array to store duplciate. The follow up seems to be simplified, in general, it may ask while allowing to store duplicate values, what is to make each number to has the same probility in getRandom(say 1,2,2,2,2,2,3), 1 and 2 and 3 has the same 1/3 probility to be returned.
i was able to come up with similar solution. I'm happy lol. I was thinking along with him
I feel that moment when you said "do you really talk like this in real interviews" and he replied "what's wrong with how I talk"
Your reaction was "nothing" 🤣🤣 I felt that man 🤣🤣
He should have been honest there!
Judging from the comments he's kinda acting; but besides your ability to solve problems, it's also super important to be pleasant to work with. One can be funny and entertaining while staying humble and mindful.
like we say in chile, "que cagon eres" she should tell him with no fear of hurting him lol
I'm actually him during my interviews 😂😂 Its easy to figure out solution when you're not under pressure, but in actual interviews there's so many things that can happen and the anxiety can get to you and affect your performance.
disqualified for cheating 😂love how calm NeetCode is
Unironically got a very similar question for Amazon SDE position
Something important is the use of descriptive names for your variables, because in this case without any previous context you won’t figure out what’s the function of “map” or “values”variables.
thats actually a great point! I guess in this case what kind of variable names would you use? Bcuz i cant think of what to call them other than values either lol
@@mannyb096 removedInt
I think the end solution doesn't consider removing a value from a map that has only one index
I love this, frying pan makes coding interviews fun
So many headaches to end up in a cubicle Monday to Friday.
May as well deploy this knowledge to develop independently and get all the benefits.
Ngl I thought he'd do a lot better for a meta intern. The first question was easy as balls
all about connections. I am sure he still a good programmer.
It was a bit surprising, I thought the problem solving part would be more or less breeze for a meta intern, we will just watch the process.
Good parts:
Asked good questions. Voiced thought process. Provided good test cases. Could recover from bugs. Could make use of hints. Solved the assignment.
Not so good and red flags:
Too focused on how to ace the coding part instead of making a good impression as a team player. Some unnecessary code.
Raised voice and tried to school the interviewer to cope with pressure.
Didn't act humble and didn't seem very interested in reflection after the interview, instead was more interested in competition and returning a "hard" question.
Also foul language and improvable attitude and composure. Might be just acceptable in a youtube interview but would have been much better without that!
Thanks to both for the video!
It's his friend bro
9:45
Being someone that first learned about lists in C, removing and adding was truly something, seeing this makes me have high hopes in my future coding career lol.
You mentioned that you don’t actually use Google docs for coding interviews? What do you use a Google IDE? How do you draw out solutions on a Google online interview?
it's not exactly "Google docs" but it's basically the same thing, just with syntax highlighting and no autocomplete (or there wasn't when I interviewed)
yea its kind of a modified version of google docs (at least that's what it looked like) with syntax highlighting
i'm not really sure about that but inserting in a hashmap, will, at some point, result in a reallocation of the elements, since under the hood you store the elements inside an array indexed using a hash function. Usually you allocate more space when you have the array half full or 3/4. A data structure with an array that has a little buffer and gets reallocated when half full will get you the same time complexity, i suppose.
Also when deleting, yes, when you delete an element from the end of the array you don't need to push elements around to fill a void, but you still retain that memory. After some delete operations you would want to release that memory by realloc-ing everything in a smaller array and freeing the old memory.
The code in follow up has a bug...
In the remove function, when the size of self.map[value] equals to zero, we need to delete the empty set like `del self.map[value]`.
Otherwise, next remove call for same element will cause an error.
The collab I didn't know I needed ..... 🙃
By the way, his original solution was great.
We could still use a set, to insert and remove in O(1). As for the get_random method, he should have used 'random.randint(0, len(self.values)-1)' to get a random index and then get it using self.values[index].
Exactly what I was thinking for my original design
The collab I was waiting for years. You guys are prob my fav swe youtubers
So funny. I am still struggling with leetcode by just finishing the first 200. And I did not have much interview experience. The video makes me feel like we are all human beings.
Love the "Now let me ask you another question" at the beginning haha. Very inciteful video btw
Awesome. I learned so much about how a coding interview looks like. Thank you!!
Never thought interviews would be that funny, cool !
Bro why didn't you upload this sooner I had my interview yesterday :,)
WOW being a weirdo does not stop u from getting hired!! keep it tight!!
Neet code Please do conduct whenever possible it helps the everyone a lot of Learning. Thank you so much...
I nearly fell off my chair at the comment that not having a way to turn off auto-caps was "not very inclusive". If I were the hiring manager that would have been a red flag moment.
Big fan of neetcode ❤️ just want to thank for all the amazing content you post in your channel... Thank you 🙏 love from India
I am happy to know I almost guessed all the approach correctly!!
this is called using an army tank to kill a mosquito 😴
This is prolly the best channel out there for ds algos!!!
Nice video, I can feel the pressure of the interviewee by his word and face
I like how he said using google docs is stupid and it pisses me off in an interview 😂
pretty decent easy-med level q to ask, will use in my own new hire interviews as it makes for good discussion!
I never thought i needed this collab until now...
You never know what u need until its too late. Thats why ur broke.
There is an obvious bug when the value we are going to remove is equal to the last element in values list, in which case adding the index before removing will end up losing the index.
this problem seems way too easy for a an interview even in a small it company
Haha, i dont think any interviewee would ask questions like that.
It is obvious that its done by him on purpose to kinda make it more educational for the viewers
I've been working as a software developer and I have had to make use of a hash map exactly once in my life
Priceless video!! Thank you so much!!
This is so clutch. I have a Google interview in 2hrs
How did it go?
It’s so whatnow?
After Dream, NeetCode and Marshmello are the RUclips biggest mysteries.
Dude is interviewing the interviewer
Invigorating! Great questions all around, even greater thoughts and solutions!
Funniest, energetic interview I have ever seen , I want confidence like this😅🤣
lol he just googled in b/w an interview. I wish my interviewer is this much flexible xD
Bro, if these types of questions are asked, everyone would get hired. It's the same as one of my college hw in c++.
This problem seems so easy when we consider their current level
This is a great interview question. Easy to understand, lots of tradeoffs.
Would interviewers be more impressed if YOU implement methods like pop(), append(), iterator().next(), etc... and not use the already integrated ones?
Nice video btw :)
So useful and so fun session. thank you for this video, it relaxes me somehow while hearing the layoff news
From the speaking tone, seems like Intern is taking interview of Neetcode 😂
Awesome, more of that would be highly appreciated
this was really informative and fun at the same time. thanks NeetCode.
Another important question that could have been asked is the range of possible values to be inserted, it can influence a lot the final solution complexity!
Saw this Video yesterday, got random recommendation and today i got this question on leetcode daily challenge question, i was shocked about it but the explanation was so good i did the question in one go
thank you for this interview and guidance, now they are forcing me to be the CEO of Alphabet.
got my first interview on wednesday and this video equally relaxes and terrifies me 😅
Trouble is I cannot think aloud. I can think, then explain, but that takes more time. Hopefully not an issue, but we shall see 🤞
OMG, very impressed by this solution.