Topics

This is a list of important topics in LeetCode, along with their difficulty to learn and the expected return on investment (ROI) for technical interviews.

Topic Difficulty to Learn Return on Investment
HashMap Low High
Two Pointers Medium High
Sliding Window Medium High
Stack Medium High
Linked List High High
Recursion Low High
Tree DFS Medium High
Tree BFS Medium High
BST Medium High
Heap Medium Medium
Graph BFS / DFS on Grids Medium High
Greedy High Medium
Complexity Low High
Graph DFS Medium Medium
Backtracking Medium Medium
Binary Search High Medium
Divide and Conquer Medium Low
Dynamic Programming High High
Trie Medium Low
Union Find High High
Topological Sort Medium High
Dijkstra’s Algorithm High High
Bellman-Ford High Medium
A* Search High Low
AVL Trees High Low
Segment Tree High Medium
Fenwick Tree / BIT High Medium
Suffix Array Very High Low

Explanation

  • Difficulty to Learn: This is a subjective assessment of how difficult each topic is to understand and implement. Topics marked as “High” might require more practice and experience to master.
  • Return on Investment: This is a rough estimate of how often these topics appear in coding interviews and how valuable they are for solving problems efficiently.

Table of contents