Skip to content

Repository files navigation

Arrays & Hashing

LeetCode ID Difficulty Problem Solutions
217 Easy Contains Duplicate C++ • Go • Java • Python
242 Easy Valid Anagram C++ • Go • Java • Python
1 Easy Two Sum C++ • Go • Java • Python
49 Medium Group Anagrams C++ • Go • Java • Python
347 Medium Top K Frequent Elements C++ • Go • Java • Python
238 Medium Product of Array Except Self C++ • Go • Java • Python
36 Medium Valid Sudoku C++ • Go • Java • Python
128 Medium Longest Consecutive Sequence C++ • Go • Java • Python

Two Pointers

LeetCode ID Difficulty Problem Solutions
125 Easy Valid Palindrome C++ • Go • Java • Python
167 Medium Two Sum II C++ • Go • Java • Python
15 Medium 3Sum C++ • Go • Java • Python
11 Medium Container with Most Water C++ • Go • Java • Python
42 Hard Trapping Rain Water C++ • Go • Java • Python

Sliding Window

LeetCode ID Difficulty Problem Solutions
121 Easy Best Time to Buy & Sell Stock C++ • Go • Java • Python
3 Medium Longest Substring Without Repeating Characters C++ • Go • Java • Python
424 Medium Longest Repeating Character Replacement C++ • Go • Java • Python
567 Medium Permutation in String C++ • Go • Java • Python
76 Hard Minimum Window Substring C++ • Go • Java • Python
239 Hard Sliding Window Maximum C++ • Go • Java • Python

Stack

LeetCode ID Difficulty Problem Solutions
20 Easy Valid Parentheses C++ • Go • Java • Python
155 Medium Min Stack C++ • Go • Java • Python
150 Medium Evaluate Reverse Polish Notation C++ • Go • Java • Python
22 Medium Generate Parentheses C++ • Go • Java • Python
739 Medium Daily Temperatures C++ • Go • Java • Python
853 Medium Car Fleet C++ • Go • Java • Python
84 Hard Largest Rectangle in Histogram C++ • Go • Java • Python

Binary Search

LeetCode ID Difficulty Problem Solutions
704 Easy Binary Search C++ • Go • Java • Python
74 Medium Search a 2D Matrix C++ • Go • Java • Python
875 Medium Koko Eating Bananas C++ • Go • Java • Python
33 Medium Search in Rotated Sorted Array C++ • Go • Java • Python
153 Medium Find Minimum in Rotated Sorted Array C++ • Go • Java • Python
981 Medium Time Based Key-Value Store C++ • Go • Java • Python
4 Hard Median of Two Sorted Arrays C++ • Go • Java • Python

Linked List

LeetCode ID Difficulty Problem Solutions
206 Easy Reverse Linked List C++ • Go • Java • Python
21 Easy Merge Two Sorted Lists C++ • Go • Java • Python
141 Easy Linked List Cycle C++ • Go • Java • Python
143 Medium Reorder List C++ • Go • Java • Python
19 Medium Remove Nth Node From End of List C++ • Go • Java • Python
2 Medium Add Two Numbers C++ • Go • Java • Python
287 Medium Find the Duplicate Number C++ • Go • Java • Python
146 Medium LRU Cache C++ • Go • Java • Python
23 Hard Merge k Sorted Lists C++ • Go • Java • Python
25 Hard Reverse Nodes in k-Group C++ • Go • Java • Python

Trees

LeetCode ID Difficulty Problem Solutions
226 Easy Invert Binary Tree C++ • Go • Java • Python
104 Easy Maximum Depth of Binary Tree C++ • Go • Java • Python
543 Easy Diameter of Binary Tree C++ • Go • Java • Python
110 Easy Balanced Binary Tree C++ • Go • Java • Python
100 Easy Same Tree C++ • Go • Java • Python
572 Easy Subtree Of Another Tree C++ • Go • Java • Python
235 Medium Lowest Common Ancestor Of A Binary Search Tree C++ • Go • Java • Python
102 Medium Binary Tree Level Order Traversal C++ • Go • Java • Python
199 Medium Binary Tree Right Side View C++ • Go • Java • Python
1448 Medium Count Good Nodes In Binary Tree C++ • Go • Java • Python
98 Medium Validate Binary Search Tree C++ • Go • Java • Python
230 Medium Kth Smallest Element In A Bst C++ • Go • Java • Python
105 Medium Construct Binary Tree From Preorder And Inorder Traversal C++ • Go • Java • Python
124 Hard Binary Tree Maximum Path Sum C++ • Go • Java • Python

Tries

LeetCode ID Difficulty Problem Solutions
208 Medium Implement Trie Prefix Tree C++ • Go • Java • Python
211 Medium Design Add And Search Words Data Structure C++ • Go • Java • Python
212 Hard Word Search Ii C++ • Go • Java • Python

Backtracking

LeetCode ID Difficulty Problem Solutions
78 Medium Subsets C++ • Go • Java • Python
39 Medium Combination Sum C++ • Go • Java • Python
46 Medium Permutations C++ • Go • Java • Python
90 Medium Subsets II C++ • Go • Java • Python
40 Medium Combination Sum II C++ • Go • Java • Python
79 Medium Word Search C++ • Go • Java • Python
131 Medium Palindrome Partitioning C++ • Go • Java • Python
17 Medium Letter Combinations Of A Phone Number C++ • Go • Java • Python
51 Hard N Queens C++ • Go • Java • Python

Heap

LeetCode ID Difficulty Problem Solutions
703 Easy Kth Largest Element In A Stream C++ • Go • Java • Python
1064 Easy Last Stone Weight C++ • Go • Java • Python
973 Medium K Closest Points To Origin C++ • Go • Java • Python
215 Medium Kth Largest Element In An Array C++ • Go • Java • Python
621 Medium Task Scheduler C++ • Go • Java • Python
355 Medium Design Twitter C++ • Go • Java • Python
295 Hard Find Median From Data Stream C++ • Go • Java • Python

Graph

LeetCode ID Difficulty Problem Solutions
200 Medium Number Of Islands C++ • Go • Java • Python
695 Medium Max Area Of Island C++ • Go • Java • Python

About

C++ / Go / Python / Java Solutions for problems in https://neetcode.io

Topics

Resources

Stars

10 stars

Watchers

1 watching

Forks

Contributors

Languages