Taro Logo
0

RE: Edge cases in Alex's DSA course

Profile picture
Software Engineer at Taro Community2 days ago

Alex lists out 10+ edge cases in K closest points. I had a few Qs

  1. He mentions that many candidates would miss int overflow, but what if youre working in python? theres no int overflow or worrying about data types? I'm guessing you would just mention this?
  2. Do you just literally list out the edge cases? how does it work in practice? esp for the billion+ numbers. Do you just ask oh can the input have billion+ numbers or do you need to also provide a solution for every single edge case? because its if you have a trillion numbers you cant just use an array youd need a more sophisticated system which derails from DSA
  3. Alex mentions Strong Yes candidates ask 80%(~8+) clarifying questions and 80%(~8+) edge cases. Wouldnt this take up so much time. Assuming you spend 20 seconds per questions and 20 seconds per response to each edge cases thats 16 questions you'd ask which is almost 5-7 mins spent. If you need to do 2 problems thats almost 10-15 mins just asking questions
19
1

Discussion

(1 comment)
  • 0
    Profile picture
    Tech Lead @ Robinhood, Meta, Course Hero
    2 days ago

    He mentions that many candidates would miss int overflow, but what if youre working in python? theres no int overflow or worrying about data types? I'm guessing you would just mention this?

    Yep, you would just mention this, demonstrating a mastery of your language.

    Do you just literally list out the edge cases?

    The interviewer will generally prompt you in some way to start talking about edge cases (the classic way is asking "Now what ways can this possibly break?"). From there, you start going through the edge cases and reacting to the interviewer's responses. Some edge cases are more practical and/or higher-signal to talk about, so a good interviewer will probe you on specific ones.

    Alex mentions Strong Yes candidates ask 80%(~8+) clarifying questions and 80%(~8+) edge cases. Wouldnt this take up so much time.

    No as:

    1. Communication is supposed to take up a lot of time to get signal
    2. The coding should be fast
    3. Some of the edge cases are just a 2 second mention (e.g. input can be empty, 0, or null)
    4. If someone does a "Strong Yes" performance on Question #1, Question #2 is generally graded more lax (i.e. less expectations) so it balances out