1

Followup on the Master the DSA Interview Course - Edge Cases + Alternate Approach discussion - Can we/should we be expected to fit it in 20 mins?

Profile picture
Mid-Level Software Engineer at Walmart2 months ago

Hey folks,

I just finished Alex's Master The Data Structure and Algorithms Interview course. One question stayed with me when Alex went into how important it is for discussion on edge cases and alternate approaches in the Getting To The Next Level section. If we know that the interview will last for another x minutes when we get the coding question, which one of these options should we take?

1. Completely go berserk with edge cases and alternate solutions that you can potentially think about - and have an engaging discussion with your interviewer about the tradeoffs associated with each of the approaches, to the extent that, the interviewer does not care to see you write code (they conclude you're a DSA ninja)

2. Just take the x minutes to limit your scope, write your plan, and write the code.

I think option 2 is more prudent if x <= 25 minutes but otherwise, I will go with option 1. Having said that, I know Alex talks about folks who did this when he was the interviewer. Was this for x > 25-minute durations too?

Thanks!

39
2

Discussion

(2 comments)
  • 1
    Profile picture
    Tech Lead/Manager at Meta, Pinterest, Kosei
    2 months ago

    Alex can share his opinion when he's back from his Japan trip, but I think the answer here will depend on the signals you're getting from the interviewer.

    As Sophie mentions in our discussion about system design (but is still applicable to DSA problems), a really smart technique is to propose what you're about to do and then ask "How does that sound?" at the end.

    This gives the interviewer the option to interject if they feel like you're spending too much time on edge cases or too much time on the happy path.

    I agree with you that option 2 is probably better if you are strapped for time. The max signal the interviewer can get from you is if you actually start writing code (option 2), not just discuss all the approaches.

    • 1
      Profile picture
      Mid-Level Software Engineer [OP]
      Walmart
      2 months ago

      Beautiful! Love this! Thanks, Rahul - Sophie makes some great points too!