Quickly solving leetcode type questions

Hey guys, I have been leetcoding for a while. To be honest, I have learned a lot about DS/&A along the way (I was not a CS major). I am comfortable with most of the popular algorithms (except for advanced graphs). But whenever I see new type of question (lc medium/hard), I struggle a bit to come up with a solution. 50% of the time, I cant solve it at all. For instance I have done fair bit of string manipulation questions but I struggled to come up with the solution for regex pattern question (so many edge cases!). Also dp questions are nightmares. Same goes for pacific ocean waterflow question. I am comfortable with most of the dfs questions but I could not think “out of box” way for that particular problem. I like to think slowly and understand the problem. But if I have not seen the similar type of questions before, I don’t see how I can come up with optimal solution in 10/15 minutes. I have uber phone interview and fb onsite coming up in couple of weeks. I still feel unprepared. Looking at the interview experience threads for those companies and the speed they expect from candidates for lc medium/hards, I feel hopeless. I am not sure if I am lacking some sort of intelligence or It is just about more practice and try to minimize the “unseen” questions.

Microsoft springin Apr 3, 2019

practice. It seems you have got decent leetcode problem solving practice. Now you need more real interview exposure. Try applying to as many companies as possible, even when you dont intend to join them. Also, try finding some friends who have taken some interviews and ask them to interview you and provide feedback.

Goldman Sachs iab OP Apr 3, 2019

I do not have such friends for practice. I will try pramp for couple of weeks.

Apple Marijuana Apr 3, 2019

You're just dumb. I can solve all leetcode hard questions in 5 mins tops. Nah dude remember they do give hints and guide you so you're on the right track, so you'll be fine.

Goldman Sachs nahidegi Apr 3, 2019

Not every interviewer does that though. Some are there to simply see you fail.

Goldman Sachs iab OP Apr 3, 2019

Had a phone interview with 2 sigma recently. Interviewer presented the question as soon as we connected, said “read the question and solve it”, then went on mute. He just said “hmm” and “yes” sometimes to respond some of my questions. Getting a good interviewer is also kind of luck.

New
Kusha Apr 3, 2019

FB will not ask Hards, but it does ask two easy/medium. Not sure about Uber. Also you are lacking practice for sure , ideally it’s good to have some second rung companies for practice , or use Pramp , or ask friends.

Goldman Sachs iab OP Apr 3, 2019

I have at least one phone interview each week these days. I am very comfortable with the mechanics of interview but still have that fear that i wont be able to solve if I get new questions. You are right. I guess it is about doing more practice. I’ll try pramp for next couple of weeks.

Akamai Technologies Bboi Apr 3, 2019

You are doing good. Most ppl get through companies by getting exact/near exact *type* questions that they have solved. The competition has pushed it to this point. There is nothing you are doing “wrong”. Interviewers have skewed expectations of what a good engineer is. Keep LCing and revise techniques!

Tutanota 🆗🆒🆒 Apr 3, 2019

Which regex question is this?