Thursday, July 28, 2022

Do's & Dont's for your next Coding Interview (My Google/Amazon Experience) | https://leetcode.com/Dinesh-Varyani/

 Sharing with you some of my tips, do's, and don'ts for your next coding interview. Hope it helps :).

𝐃𝐨'𝐬 -

✅ Keep a smiling face, and look confident/positive attitude person.
✅ Ask good clarifying questions about the coding problem e.g. size/range of the input, are there any duplicates, does input contain negative values, etc.
✅ Make the interview process a team effort. The more collaboration you do with your interviewer the more idea they get about how good a team player you are.
✅ Think out loud. Always try to explain what you are thinking about the current state of the problem. Even if you are thinking on the right terms but unable to code, it still doesn't make you look like a total rejection.
✅ Always be open to saying that you don't know how certain things work.
✅ Always start thinking about the simpler version of the problem. Try to come up with a naive solution at first and later go for optimising it.

𝐃𝐨𝐧𝐭'𝐬 -

⛔️ Never dive into solving a problem as soon as it's thrown towards you. Understand the problem, resolve ambiguities.
⛔️ Never assume anything. Always clarify the assumptions you have with your interviewer.
⛔️ Avoid any technical jargon or famous words you know. If you do be prepared for the follow-up question.
⛔️ Never try to skip any idea or communication on which the interviewer wants to focus more.
⛔️ Not be too defensive about the mistakes that the interviewer tells you.

𝐖𝐡𝐞𝐧 𝐲𝐨𝐮 𝐜𝐨𝐝𝐞 -

👉 You are expected to write production-level code.
👉 Check for edge cases.
👉 Validate input and throw meaningful exceptions.
👉 Modularize code into different functions.
👉 Write meaningful variable/method names.
👉 You are expected to know the Time and Space complexity of the code you have written.
👉 You are expected to dry run your code with the example given.
👉 Don't worry about the exact syntax of the code. Meaningful text can also convey the point you trying to achieve.
👉 Try to clean up code - check for any edge cases, refactoring, remove unwanted comments (in case you comment anything), check for conditions, etc

𝐖𝐡𝐞𝐧 𝐲𝐨𝐮 𝐚𝐫𝐞 𝐬𝐭𝐮𝐜𝐤 -

👉 If you are stuck and unaware of any logic, just make/call a helper function (explain it will do XYZ)
👉 If you are stuck anywhere, your interviewer is the best person to help you out. Ask them about any hint or any question that clarifies your doubt. Remember the interviewer is not there to make you fail, they want you to succeed.
👉 If you are stuck in logic try to apply some coding patterns - like can two pointer help, can sort help, can binary search be applied, etc

problem solvingcodinginterview tipsfaang interviewcoding interviewdsa

No comments:

Post a Comment