What do you do when you’re blocked on a leetcode problem?

Google
googler16

Go to company page Google

googler16
Apr 15, 2019 13 Comments

Now and then I get blocked on a LC problem. While I find the easy problems easy, I don’t have a consistent experience between medium and hard. Sometimes the hard problems are easier to me than the mediums. I want to get to a place where I no longer block. Is it better to peek at the solution after some time or just keep thinking about it? What techniques do you use?

Thanks!

comments

Want to comment? LOG IN or SIGN UP
TOP 13 Comments
  • This comment was deleted by original commenter.

    • Its ok to ignore leetcode bugs, there are a few problems I have encountered where c# solution always TLEs even when I directly translate someone else's accepted Java solution.

      For edge cases, for harder problem I think the interviewers will cut you some slack/give hints so if you can mostly solve a hard problem that's pretty good.
      Apr 15, 2019
  • Unfortunately we’ve come to a state where if you cannot regurgitate two leetcode medium-like problems in less than an hour you’ll be rejected from the top tier companies.

    Facebook interviews are the worst, if you “think” they flag you for being slow. If you miss an edge case, before you can think the interviewer will interrupt you, give you the answer and ultimately give feedback that you can’t code.
    Apr 15, 2019 0
  • Amazon / R&D
    ps.ily

    Go to company page Amazon R&D

    PRE
    Google
    ps.ily
    You need to LRU cache in your sleep. LRU cache for breakfast, LRU cache for lunch, become the LRU cache.
    Apr 15, 2019 1
  • New
    arch135

    Go to company page New

    arch135
    It’s like a Roulette game . You score if you get an LC pattern u have seen . Interviewers expect to come up with s solution , I mean talk on the solution with in 3-5 minutes after giving the problem. I we keep thinking after 3-5 minutes they will interrupt and start guiding and finally give a negative feedback:(
    Apr 15, 2019 0
  • Amazon / Eng
    FoTS01

    Go to company page Amazon Eng

    PRE
    Samsung Electronics
    FoTS01
    One thing I found that works when you get blocked is create 10-20 test cases and work for their solution. Solving new test cases sometimes helps you see through the pattern but yeah it doesn't works everytime and not possible to do in 30 minutes as needed by Google.
    But aren't you already at Google?
    Apr 16, 2019 1