Leet code patterns

New / Eng Ssxb04
Jul 15 15 Comments

I’m beginning to interview for my 2nd job coming out of a boot camp (I’ve been at my first for 2 yrs now). I lucked out last time around and never needed to leetcode since the places I happened to have interviewed used more real world problems.

I understand that a lot of leetcode problems follow the same 4-5 patterns, and its usually just a matter of practicing enough to start recognizing them. Any good resources out there that could give me a heads up for what I should be looking for? I’m starting to get myself more familiar with some concepts like BFS, DFS, etc, but want to be sure I’m making the most of my time.

comments

Want to comment? LOG IN or SIGN UP
TOP 15 Comments
  • Goldman Sachs pakalu
    There are definitely more than 4-5 patterns. Around 30-40 to be precise
    Some of the other patterns are bucket sort( can bring down time complexity from o(nlogk) to o(n), sweep line (o(n2) to o(nlogn)) backtracking , ordered trees, backtracking, minimax, sliding window, monotonically increasing/decreasing array.
    The best way is to do all the related problems together.read a lot of discuss section of these problems
    Jul 15 6
    • Delphix / Eng Qeou08
      Wtf is ordered trees?
      Jul 15
    • Goldman Sachs pakalu
      I meant Bianry search tree.
      Jul 15
    • Dell ;57?!’h
      And what is binary search tree ?
      Jul 15
    • Walmart.com / Eng SnWB62
      Lol
      Jul 16
    • Intel / Eng NerdyTurd
      You forgot about smoking trees, you can do a search in constant time.
      Jul 16
  • Google Jeremy Aguilon's blog, he lays out the patterns fairly well.
    Jul 15 3
    • New / Eng Ssxb04
      OP
      This is great, the info here is exactly what I had in mind. Thanks!!
      Jul 15
    • Also, check out Back to Back SWE's YouTube channel - explains a ton of vital leetcode problems in a really clear and passionate manner. He tries to distill the patterns as well.
      Jul 15
    • PayPal / Eng v3nm0
      I need that dude's passion in my life. 😂👌🏼
      Jul 18
  • Amazon prestige🧐
    Cracking the Coding Interview, Elements of Programming Interviews, or just brute force by grinding LC
    Jul 15 0
  • Amazon cn227fh2m
    Just keep grinding. Eventually you will get lucky and get some problems you understand.
    Jul 15 2
    • New / Eng juugf
      How inefficient
      Jul 16
    • Verizon / Eng iLick
      Sup Linnus.
      Jul 16