Solutions and explanations of leetcode problems using the C++ programming language.
LeetCode is one of the best platforms to help you enhance your skills, expand your knowledge and prepare for practice.
NOTE: This repository is under construction. The videos are not available yet.
"Everybody should learn to program, because it teaches you how to think" (Steve Jobs).
The benefits of using C++ are that it is a very efficient language and its standard library contains a large collection of data structures and algorithms.
# | Title | Solution | Level | Topics | Video |
---|---|---|---|---|---|
1 | Two Sum | C++ | 🟢 | Array, Hash Table | YouTube |
2 | Add Two Numbers | C++ | 🟡 | Linked List, Math, Recursion | YouTube |
3 | Longest Substring | C++ | 🟡 | Hash Table, String, Sliding Window | YouTube |
4 | Median of Two Sorted Arrays | C++ | 🔴 | Array, Binary Search, Divide and Conquer | YouTube |
5 | Longest Palindromic Substring | C++ | 🟡 | String, Dynamic Programming | YouTube |
6 | Zigzag Conversion | C++ | 🟡 | String | YouTube |
7 | Reverse Integer | C++ | 🟡 | Math | YouTube |
8 | String to Integer (atoi) | C++ | 🟡 | String | YouTube |
9 | Palindrome Number | C++ | 🟢 | Math | YouTube |
10 | Regular Expression Matching | C++ | 🔴 | String, Dynamic Programming, Recursion | YouTube |
11 | Container With Most Water | C++ | 🟡 | Array, Two Pointers, Greedy | YouTube |
12 | Integer to Roman | C++ | 🟡 | Hash Table, Math, String | YouTube |
13 | Roman to Integer | C++ | 🟢 | Hash Table, Math, String | YouTube |
14 | Longest Common Prefix | C++ | 🟢 | String | YouTube |
15 | 3Sum | C++ | 🟡 | Array, Two Pointers, Sorting | YouTube |
16 | 3Sum Closest | C++ | 🟡 | Array, Two Pointers, Sorting | YouTube |
17 | Letter Combinations of a Phone Number | C++ | 🟡 | Hash Table, String, Backtracking | YouTube |
18 | 4Sum | C++ | 🟡 | Array, Two Pointers, Sorting | YouTube |
19 | Remove Nth Node From End of List | C++ | 🟡 | Linked List, Two Pointers | YouTube |
20 | Valid Parentheses | C++ | 🟢 | String, Stack | YouTube |
21 | Merge Two Sorted Lists | C++ | 🟢 | Linked List, Recursion | YouTube |
35 | Search Insert Position | C++ | 🟢 | Array, Binary Search | YouTube |
167 | Two Sum II - Input Array Is Sorted | C++ | 🟡 | Array, Two Pointers, Binary Search | YouTube |
189 | Rotate Array | C++ | 🟡 | Array, Math, Two Pointers | YouTube |
278 | First Bad Version | C++ | 🟢 | Binary Search, Interactive | YouTube |
283 | Move Zeroes | C++ | 🟢 | Array, Two Pointers | YouTube |
344 | Reverse String | C++ | 🟢 | Two Pointers, String, Recursion | YouTube |
392 | Is Subsequence | C++ | 🟢 | Two Pointers, String, Dynamic Programming | YouTube |
557 | Reverse Words in a String III | C++ | 🟢 | Two Pointers, String | YouTube |
704 | Binary Search | C++ | 🟢 | Array, Binary Search | YouTube |
724 | Find Pivot Index | C++ | 🟢 | Array, Prefix Sum | YouTube |
876 | Middle of the Linked List | C++ | 🟢 | Linked List, Two Pointers | YouTube |
977 | Squares of a Sorted Array | C++ | 🟢 | String | YouTube |
1480 | Running Sum of 1d Array | C++ | 🟢 | Array, Prefix Sum | YouTube |