DEV Community

kevin074
kevin074

Posted on

Leetcode Diary: I got an offer!!

HI everyone, I know there are a handful, literally only a handful of people who have been following through my journey with almost daily updates on here.

However, I am very happy to report to you guys that I have gotten an official offer from a company! I was so happy that I couldn't sleep for hours until 4am my time. It's been a VERY long journey for me. I started the leetcode process end of 2021 and it's been 2 months. There were also a 4 months of gruesome amount of studying for my first classes at UPenn's online CS Master program. There were couple of potential health issues in the family, myself included, that would've easily pushed me over the edge.

As for the actual interview prep, it may sound like 2 months is kinda short but I've been doing this for all my waking hours for these 2 months. So it probably translate to like 4 months or more depending on different individuals. There were many points where I was literally so burned out that I couldn't function for more than a day.

Additionally the past month ish I have been talking to too many recruiters and gone through so many interviews, many of which I have failed. There were many embarrassing failures, because they were only phone interviews process where there was even no coding involved at all; which basically meant they couldn't even pass me as a person or something :( I have failed onsite with just react/html/css coding rounds just because I haven't worked for a full year now ... Also failed another phone technical screen where the task was just code some input boxes and have a search bar filter the options with react... There were many interviews I just shouldn't have failed, but honestly thinking back this past year, there were probably only like 2 to 3 months where I completely wasted and took a vacation to enjoy life (I have been in a situation that forced me to leave my job and move out of the country).

Coming back to the offer, I didn't think they would offer me anything at all. When I was at the phone interview, I only had a decent start for the behavioral topics. But when he showed me a SIMPLE coding exercise, like literally programming 101 easy question, my brain literally just blew up. I couldn't do it to save my life like a switch just turned off. The interviewer had to walk me through the steps, I was embarrassed as fuck when that question was over.

He then showed me another question, which is just adding two numbers and return the result as a string since the input values are too big. I blanked out a bit less for this question but was clearly having troubles despite having done string additions multiple times throughout my leetcode journey before this year. This was also a question on Stanford's algorithm series, so I should've known the answer immediately.

However, I was shaking so much that it was hopeless. The interviewer obviously could see that I was just not there at all and asked me to talk through the basic ideas. Luckily since I struggled through this before, I knew exactly what the correct algorithm would entail. So I quickly talked through the logic of it, like how to handle the progression and handle cases when digit addition is more than 9. He liked what he heard and gave me the chance to code it after he hangs up, which is a complete surprise to me too; I finished within 5 minutes after he hung up.

Luckily for me, the interviewer was kind enough to see that everything was just nerves and allowed me to go into the onsite rounds. This was a giant surprise to me, I literally told my girlfriend I bombed it more than a nuclear bomb can.

The onsite was quite brutal too. The first interviewer asked me a classic system design question. However, I didn't prepare for system design at all since I am a frontend developer. So I told him about my lack of study on this and we did not spend much time on it. Then we moved on to a medium level leetcode question. I quickly came up with the simple iterative O(N) approach. He then asked me whether I could improve it. I thought that perhaps O(log N) via binary search could work, because the inputs were sorted and there were some things I could do to determine direction.

However he said binary search wouldn't work; I really think it should, maybe he just wanted to see my reaction. We then move on with a couple more spin offs for the question and I thought I had some answers, but probably just not great answers. So I thought the most this interviewer would rate me was a barely passable.

The second interviewer, was a real brain teaser. The question just gave me another mental boom, I couldn't even get started with the question. It was a true mental boom moment again for me and I could barely function.

There was so much desire to just give up, but I had to crawl my way through it just for the sake of it. There were many moments where I went back and forth with the puseudocode I wrote and even got confused at what needs to be done multiple times. In the end I came up with a O(N^4) solution to the problem. Obviously just a brute force but it was the best I could muster at the moment. As I thought about the question today, I realized it is possible to get a little better O(N^3) with memoization...but the memoization itself would be complicated all on its own so I don't know.

Thought this round was bombed too, honestly the only thing I knew was that the code would work given minimal tweaking and edge case catching. However, I didn't think a barely passable code would constitute a yes from the interviewer.

The last round was much better for me. It's a blind75 question. I came up with the solution immediately since it's something I've done in the past two months. The interviewer added a small spin on it where he wants something a little bit more. The modification was very easy, the spin did not change the difficulty of the question in my opinion, but would test whether I simply memorized the solution or understood it perfectly. We ended the session with plenty of room to talk about things. I asked a question about the work experience only since I was just exhausted to the brink.

The next day the recruiter asked me for a zoom meeting, this is always a good sign but I was too depressed to perceive that way. Additionally, a lot of recruiters just like to reconnect immediately after the onsite just to see the chances before he has a chance to get feed back from the team. He asked me how I thought the onsite was, I told him it was probably hopeless. However he immediately told me that the interviewers all gave me a yes and they thought I did well.

I was shaking again lol... it was just too much of a surprise. He then started talking about the salary and gave a number higher than my original request, which is 150k as I have seen from most recruiter emails. I was super overwhelmed. It was truly unbelievable since I was SURE that it was doomed.

He reassured me again that they will be giving an offer, but cannot do that without the financial approval. He then focused the discussion on how much they would have to offer to detract me from continuing to interview, which was flattering at the highest level to me. It was just all too much, all I remembered was the shaking.

I did not say yes to the offer out of principle and told them that I have an Amazon and Google interview in the next two weeks; it's true I really do lol. Unfortunately I had to reject the Google interview since the offer letter expires on the day of the Google onsite. As for the Amazon one, I am somewhat optimistic but that's a story for next week when I hear back from them.

Thanks for everyone who's been reading my articles. It's been really helpful to type out my thoughts for each question and get some positive feedback throughout these past months. Thank you all and hopefully next week I can title it:

"Leetcode Diary: I am Amazonian!!!"

Top comments (2)

Collapse
 
valeriavg profile image
Valeria

Congratulations 👏
It gets easier with time and good luck!

Collapse
 
kevin074 profile image
kevin074

Thanks! I just received word that I didn't get into Amazon, so I guess this series will continue after some break first :P