No matter how many leetcode questions I solve, I cannot figure out how to approach it without looking at the hints or the solution. I feel like during an interview setting, with the added pressure, I wouldn't be able to come up with something especially if it's a question I've never seen before. Did everyone here get better at solving coding questions overtime? I want to be optimistic and that maybe it just takes me longer for my brain "get it". Any tips on what I can do to improve? Thank you in advance!
Does anyone here struggles with technical whiteboard interview questions?
I totally understand what you go through. First of all, please don't take it too hard on yourself. I liked the below quote, just read in a newsletter today:"Sometimes we are too hard on ourselves and criticize our mistakes to an unhelpful degree. Sometimes we are too easy on ourselves and let excuses run our lives." - Somehow I felt it was true to a great extent!Now coming to the leetcode part, I recently started to take up pair programming and coding tasks as part of interviews. Sharing some of my learning and observations below, hope you find them a bit helpful.- Except for FAANG companies, most of them are moving away from typical DS or leetcode type questions. Especially for non fresh grad roles.- Infact, I have seen JDs where they clearly mention their hiring process in terms of what sort of questions they ask during such rounds. Mostly they ask a problem/use case related to their day-to-day job. In a way, I feel that's much better. Especially when you read the company's tech blogs in advance, you get a hang of what they are trying to solve, their tech stack, where they are struggling, and so on. It helps set the stage to a decent extent.- Onsite white boarding is something that I don't get to do, as I majorly look for remote jobs (global). Still, from what I understand, the interviewer does not look for the "best" solution. First step is to understand whether you are able to come up with an approach/solution to make it work. Second step is to come up with better alternatives in terms of performance, scaling, security. Infact, the zeroth step is to ensure you can code the basics without any help. When we forget a syntax they usually ask us to google, as everyone knows that's the way most of us work. Take away from this point is that, spend sometime to understand the engineering culture of the company, and apply what will suit your strengths. Applying in wrong places (for whatever reasons), getting rejected only demotivates us. - What helps me improve is, building small side projects, even automating some small task on my own completely from the scratch helps. It gives the big picture, helps with improving application design, adding loggers, adding comments, writing testcases, deploying them, adding CI, end of the day, only these things will be valued. Also, there is no right or wrong way of doing your own projects. And software once written is not etched, it always has to be refactored. Good engineers know that, and do that. That mindset helped me a lot to overcome the stress and tension in an interview. - Another big advantage is that, without any conscious effort, it helps build your git profile. It brings in visibility to your resume. Infact, I read one JD today morning where they mentioned:"A take-home coding exercise followed by a half day session in which We will go through the code and ask you to do some adjustments to the same code. This step can be skipped if your open source contribution is enough for us to review.A systems design interview in which we will ask you to draw some boxes and talk through architectural choices, trade offs and failure modes "If we make open source contributions, or have solid projects on our git, it becomes an advantage.- IMHO, leetcode type questions helps become strong in a language, aid us in thinking of a solution when we see a problem. I also get nervous when I see leetcode as most of the time I tend to click on show hints. On top of it, when I read other people's solution I feel even more dejected. So I stopped going there, as I found alternatives. I sat and wrote down as to what I get out of answering leetcode questions. I found alternatives to do the same, but without any pressure, also something that I can show on my profile.Hope these pointers help you a bit. Please feel free to DM me, if you'd like to chat further.