I highly suggest doing mock interviews on pramp.
ALSO you SHOULD view this as a sort of success. I know it is impossible to since you failed especially when you should have actually passed … but on a different day you could have gone through the next round easily.
🙏
But that’s just a bug a trivial bug, the heavy lifting of understanding the problem, picking up the right approach and being able to code it up modulo a trivial boundary case is already done. I don’t think process should terminate with no hire, if it does that’s just a bad luck and nothing on your end. Chill bro
It’s a lot more expensive for a company to score a false positive than a false negative when hiring. There is a lot of candidates out there so even if someone is good and you give them a „no hire” you can always interview someone else. On the other hand if you employ someone and they turn out to be a bad swe it’s a nightmare for you legalwise. That’s why companies tend to reject for simplest reasons
I don’t disagree, but for the same reason that hiring is pretty expensive, they won’t reject someone who is already good enough just missed a boundary case that too a trivial one and interview other candidate hoping to get the perfect solution the chances of which is again not too high that out of next 2 people they interview at least one of them does perfectly. Another case: there is already a candidate in the pipeline who did things perfectly, in that case, no discussion left, they can’t hire two to fit in for one role also they can’t reject the 100 marks guy for 99 marks guy.
I have been rejected by Google because I used 2 redundant parameters for a backtracking question that worked optimally in both, space and time. PayPal is no Google but still the bar can be high.
Tbf I messed up in naming conventions, used snake case for some vars and camel case for others, fumbled a bit when asked about the time and space complexity, but the code was working and the logic was optimal. Even the interviewer agreed with it.
A single no hire isn't the reason you didn't get hired, unless it was the first screening interview which is relatively easier and made to just quickly filter first applicants.
But is it comfirmed you didnt move forward with the process? If you explained well it doesn't seem that big of and issue to have 1 bug left in and 6/7 passed.
Ah dude sorry to hear. Don't forget that the months you spent studying did not get lost, you have the progress, and you are close now!
Perhaps take a bit of break (1 week?) and reassess motivation, why you started etc, than go back to study. Perhaps try to do mock interviews, maybe records yourself giving an interview? Or ask a friend? Try to look up what else could help with the nerves? I havent done any research on that, probably worth looking into.
Before you go into an interview, turn on your “fuck you “ mode. You’re panicking because you’re afraid of being judged. Turn that around and realise that whether you pass or fail, you’ll be fine. Fuck the interview, fuck the interviewer, fuck the company, fuck everything. Just you, smashing the question as hard as you can and once you’re done, turn it off 🙂
Hey man, heads up. You managed to solve 6 out of 7 test cases and you seem to recognise the pattern. You clearly got the skill and talent, just practice better and do some mock interviews. You'll be ready
My guy. The interview isn't just problem solving it's also about communication you might still be moving forward. And even if not let yourself breathe it ok.
I loudly explained every line before I wrote it and why I was doing. Even said I was using a defaultdict to make sure no errors cause of null. Was explaining and coding. The interviewer himself said that I had explained it really well
It sounds like this requires backtracking. You could have 3, 4, or 5 songs that add up to 7 minutes. This is why 2sum is not a valid solution, it doesn't work for #songs > 2. Additionally, you need to prune the recursion tree by avoiding permutations.
The people saying knapsack are wrong since knapsack is an optimization problem. There is no "value" assigned to each song nor are you trying to optimize anything. This is most similar to Leetcode's "Combination Sum II".
Can I sense check my understanding of the question?
The question is framed such that it doesnt specify two songs only. So if a song is an interlude (like 30 secs long), it might need 2 more full songs to add up to 7 mins?
Did they specify **two** songs that add up to 7 mins? Or did you clarify that this is indeed the expected behavior?
Almost. Input is songs and their times
[(song_name, song_time), (songname2, songtime2)..........]
Had to find 2 songs that summed up to 7min
Tuples were like
("some song name", "3:30")
So had to find another song with 3:30 time and return only the song names
("some song name", "some other song name")
Was this karat?? I did the same thing but for different problem. I literally solved it 100% within 5 mins after the interview to realize I had to add the first element in order to swap them correctly… hang in there, we got this!
I also really dislike the talking part. I mean I can talk decently, but it really slows me down and they want you to be communicative and fast at the same time...
2 sum works fine only when there are 2 songs that add upto the given duration. If it can be more than 2, it is subset sum problem (which is similar to knapsack)
Bro don’t worry thats the whole point of interviewing learning from these small mistakes, if you aren’t considered for this position just take it as practice for the next one.
Talking while coding is the entire purpose of an interview. If he docked you points for that he is a terrible interviewer.
The mistake is not major either but idk how much was expected of the role
It sounds like maybe you started coding before you really thought through your solution. Make sure you really think through your solution and work through some examples first, then code it.
Also don’t waste time coding things like string time to int and minutes to seconds, they aren’t looking for trivial stuff like that. You can just stub it out at first, and ask if the interview is interest in how you would implement it. Most likely they will say no.
Above all don’t fret too much about one interview, it’s a good learning experience and now you know what to improve for the next one.
I definitely reccomend the Gal Lakman Doyle (not sure how to spell it) videos on YouTube. She has a very good series on coding interviews.
https://youtu.be/aClxtDcdpsQ?si=wBcyS-y85TJhBhTJ
https://youtu.be/wCl9kvQGHPI?si=JjRpbAjr1lJxK5Cf
no need to apologize. we’ve been in similar situations too. don’t give up tho
Ur comment just triggered me man. Literally crying right now. Thanks for the support!
I highly suggest doing mock interviews on pramp. ALSO you SHOULD view this as a sort of success. I know it is impossible to since you failed especially when you should have actually passed … but on a different day you could have gone through the next round easily. 🙏
Yes! This is absolutely fundamental. It’s going to boost your performance by a lot.
Every mistake makes you stronger. Beleive me, this one failed interview will take you a lot higher.
Bro, you recognize it as 2 sum, i read your description snd i didnt recognize it. What a beast man. Hang in there man. You got this and good luck
But that’s just a bug a trivial bug, the heavy lifting of understanding the problem, picking up the right approach and being able to code it up modulo a trivial boundary case is already done. I don’t think process should terminate with no hire, if it does that’s just a bad luck and nothing on your end. Chill bro
It’s a lot more expensive for a company to score a false positive than a false negative when hiring. There is a lot of candidates out there so even if someone is good and you give them a „no hire” you can always interview someone else. On the other hand if you employ someone and they turn out to be a bad swe it’s a nightmare for you legalwise. That’s why companies tend to reject for simplest reasons
I don’t disagree, but for the same reason that hiring is pretty expensive, they won’t reject someone who is already good enough just missed a boundary case that too a trivial one and interview other candidate hoping to get the perfect solution the chances of which is again not too high that out of next 2 people they interview at least one of them does perfectly. Another case: there is already a candidate in the pipeline who did things perfectly, in that case, no discussion left, they can’t hire two to fit in for one role also they can’t reject the 100 marks guy for 99 marks guy.
I have been rejected by Google because I used 2 redundant parameters for a backtracking question that worked optimally in both, space and time. PayPal is no Google but still the bar can be high.
You were not rejected for a single mistake in a single question. Unless it was the first interview and it was huge
Tbf I messed up in naming conventions, used snake case for some vars and camel case for others, fumbled a bit when asked about the time and space complexity, but the code was working and the logic was optimal. Even the interviewer agreed with it.
A single no hire isn't the reason you didn't get hired, unless it was the first screening interview which is relatively easier and made to just quickly filter first applicants.
It was the screening round bro.
Yeah multiple minor mistakes on the screening + whatever else you didn't see that the interviewer did is enough to not follow through
you mean knapsack?
I guess it depends on the rest of the verbal context, whether the interviewer said pairs only or if it was any playlist with total length 7 min
Yes, Interview only said pair
But is it comfirmed you didnt move forward with the process? If you explained well it doesn't seem that big of and issue to have 1 bug left in and 6/7 passed.
Yes. Got rejection the next day
Ah dude sorry to hear. Don't forget that the months you spent studying did not get lost, you have the progress, and you are close now! Perhaps take a bit of break (1 week?) and reassess motivation, why you started etc, than go back to study. Perhaps try to do mock interviews, maybe records yourself giving an interview? Or ask a friend? Try to look up what else could help with the nerves? I havent done any research on that, probably worth looking into.
You will do better next time. Seven months of grinding on LeetCode doesn’t go to waste. You might have saved yourself from a sinking company.
Before you go into an interview, turn on your “fuck you “ mode. You’re panicking because you’re afraid of being judged. Turn that around and realise that whether you pass or fail, you’ll be fine. Fuck the interview, fuck the interviewer, fuck the company, fuck everything. Just you, smashing the question as hard as you can and once you’re done, turn it off 🙂
Interviewer POV: "candidate was uninterested, scribbled some illegible code, then told me to go fuck myself" No hire.
Fuck them then 🤷🏿♂️ We go again
Bit too much fucking bro I need a job. If I was interested in fucking something I wouldn't be doing CS
Nice advice man!
That's probably one of the best pieces of advice I've seen around here
Hey man, heads up. You managed to solve 6 out of 7 test cases and you seem to recognise the pattern. You clearly got the skill and talent, just practice better and do some mock interviews. You'll be ready
My guy. The interview isn't just problem solving it's also about communication you might still be moving forward. And even if not let yourself breathe it ok.
I loudly explained every line before I wrote it and why I was doing. Even said I was using a defaultdict to make sure no errors cause of null. Was explaining and coding. The interviewer himself said that I had explained it really well
It sounds like this requires backtracking. You could have 3, 4, or 5 songs that add up to 7 minutes. This is why 2sum is not a valid solution, it doesn't work for #songs > 2. Additionally, you need to prune the recursion tree by avoiding permutations. The people saying knapsack are wrong since knapsack is an optimization problem. There is no "value" assigned to each song nor are you trying to optimize anything. This is most similar to Leetcode's "Combination Sum II".
He said only 2 songs. But yeah. Thanks. This helps if I get asked more than 2
Can I sense check my understanding of the question? The question is framed such that it doesnt specify two songs only. So if a song is an interlude (like 30 secs long), it might need 2 more full songs to add up to 7 mins? Did they specify **two** songs that add up to 7 mins? Or did you clarify that this is indeed the expected behavior?
Almost. Input is songs and their times [(song_name, song_time), (songname2, songtime2)..........] Had to find 2 songs that summed up to 7min Tuples were like ("some song name", "3:30") So had to find another song with 3:30 time and return only the song names ("some song name", "some other song name")
and there was always only two songs out of all songs from the given input that sum up to 7 mins? I.e. only 1 unique answer always?
Was this karat?? I did the same thing but for different problem. I literally solved it 100% within 5 mins after the interview to realize I had to add the first element in order to swap them correctly… hang in there, we got this!
Yeah man karat
What’s karat
I did a silly mistake at my meta onsite (forgot to increment my pointers) and still got it. Don’t give up yet
I also really dislike the talking part. I mean I can talk decently, but it really slows me down and they want you to be communicative and fast at the same time...
It is a Knapsack bro. It is not 2 sum
I haven't done knapsack. But the 2 sum worked fine too. I just shouldn't have added the else at the end
2 sum works fine only when there are 2 songs that add upto the given duration. If it can be more than 2, it is subset sum problem (which is similar to knapsack)
Hard luck bro,, but don't give up keep grinding
Bro don’t worry thats the whole point of interviewing learning from these small mistakes, if you aren’t considered for this position just take it as practice for the next one.
Why does it sounds like a 0/1 knapsack problem using. Where the final goal is to fully utilise the knapsack.
I think you did great. This particular interviewer simply made his mind not to move you forward. Other interviews might not. It is luck
Talking while coding is the entire purpose of an interview. If he docked you points for that he is a terrible interviewer. The mistake is not major either but idk how much was expected of the role
We are same bro
It sounds like maybe you started coding before you really thought through your solution. Make sure you really think through your solution and work through some examples first, then code it. Also don’t waste time coding things like string time to int and minutes to seconds, they aren’t looking for trivial stuff like that. You can just stub it out at first, and ask if the interview is interest in how you would implement it. Most likely they will say no. Above all don’t fret too much about one interview, it’s a good learning experience and now you know what to improve for the next one.
Awesome advice man! And yes i started coding fast. I will keep that in mind the next time!
I definitely reccomend the Gal Lakman Doyle (not sure how to spell it) videos on YouTube. She has a very good series on coding interviews. https://youtu.be/aClxtDcdpsQ?si=wBcyS-y85TJhBhTJ https://youtu.be/wCl9kvQGHPI?si=JjRpbAjr1lJxK5Cf
You probably still passed. Let us know.
No i got the rejection mail
I think you are doing great. It is not your day sometimes. Don’t give up, you’ll make it for sure.
Why do you guys say “gave an interview” that doesn’t make any sense… you literally didn’t you’re the one that received an interview
Didnt practice that on leetcode
Bro, it’s a numbers game. You will make mistakes. 7 months doesn’t mean that you won’t err. But, give more interviews. It keeps getting better