Top 20 LeetCode Coding Patterns to Attempt with Problem Set

B M Mahmud
2 min readNov 23, 2022

--

Instead of investing a lot of time-solving various problems without improving one’s ability to answer any question type. Here, I’ve included some of the most typical Leetcode patterns that can help you muster in specific category problems and secure the SDE role, which is currently increasingly getting tough.

[This post will update regularly. So, better to add to your reading list.]

Solving questions about the same data structure is a SMART strategy that is frequently used. For instance, one may concentrate on questions about arrays before moving on to questions about linked lists, hash maps, heaps, trees, or tries, etc.

These 20 of this 𝗰𝗼𝗱𝗶𝗻𝗴 𝗽𝗿𝗼𝗯𝗹𝗲𝗺 𝗽𝗮𝘁𝘁𝗲𝗿𝗻𝘀 that I believe can help anyone learn these beautiful algorithmic techniques and make a real difference in the coding interviews.

1) Sliding Window

2) Islands (Matrix Traversal)

3) Two Pointers

4) Fast & Slow Pointers

5) Merge Intervals

6) Cyclic Sort

7) In-place Reversal of a LinkedList

8) Tree Breadth-First Search

9) Tree Depth First Search

10) Two Heaps

11) Subsets

12) Modified Binary Search

13) Bitwise XOR

14) Top ‘K’ Elements

15) K-way Merge

16) Topological Sort

17) 0/1 Knapsack

18) Fibonacci Numbers

19) Palindromic Subsequence

20) Longest Common Substring

Update To Be Continue. . .

--

--

B M Mahmud
B M Mahmud

Written by B M Mahmud

Hi, I am Mahmud. I love to share my ideas and learning strategies. You know, Sharing is caring. To know me more, check out my all links, bio.info/imash

No responses yet