Studying LeetCode problems with Python
Since 2021.03.20
Try to use Pythonic approaches.
Although I have studied algorithms and data structure since my undergraduate, I realize I have shallow experience in Python.
Most of my prior algorithmic study was focused on C and Java.
This project is to familiarize myself with fundamentals of algorithms and data structure and further to prepare the coding interview.
-
- Max Consecutive Ones
- Find Numbers with Even Number of Digits
- Squares of a Sorted Array
- Duplicate Zeros
- Merge Sorted Array
- Remove Element
- Remove Duplicates from Sorted Array
- Check If N and Its Double Exist
- Valid Mountain Array
- Replace Elements with Greatest Element on Right Side
- Move Zeroes
- Sort Array By Parity
- Remove Element In-Place
- Height Checker
- Max Consecutive Ones II - Flip one 0
- Third Maximum Number
- Find All Numbers Disappeared in an Array
- Squares of a Sorted Array - O(N) solution
-
- Design Linked List - Singly Linked List
- Linked List Cycle
- Linked List Cycle II
- Intersection of Two Linked Lists
- Remove Nth Node From End of List
- Reverse Linked List
- Remove Linked List Elements
- Odd Even Linked List
- Palindrome Linked List
- Design Linked List - Doubly Linked List
- Merge Two Sorted Lists
- Add Two Numbers
- Flatten a Multilevel Doubly Linked List
- Insert into a Cyclic Sorted List
-
Binary Tree
-
Recursion I
-
Recursion II
-
Array and String
-
Queue and Stack
-
Binary Search
-
Binary Search Tree
-
Trie
-
Hash Table
# | Title | Difficulty |
---|---|---|
1 | Two Sum | Easy |
2 | Add Two Numbers | Medium |
3 | Longest Substring Without Repeating Characters | Medium |
4 | Median of Two Sorted Arrays | Hard |
5 | Longest Palindromic Substring | Medium |
6 | ZigZag Conversion | Medium |
7 | Reverse Integer | Easy |
8 | String to Integer (atoi) | Medium |
9 | Palindrome Number | Easy |
10 | Regular Expression Matching | Hard |
11 | Container With Most Water | Medium |
12 | Integer to Roman | Medium |
13 | Roman to Integer | Easy |
14 | Longest Common Prefix | Easy |
15 | 3Sum | Medium |
16 | 3Sum Closest | Medium |
17 | Letter Combinations of a Phone Number | Medium |
18 | 4Sum | Medium |
19 | Remove Nth Node From End of List | Medium |
20 | Valid Parentheses | Easy |
21 | Merge Two Sorted Lists | Easy |
26 | Remove Duplicates from Sorted Array | Easy |
27 | Remove Element | Easy |
695 | Max Area of Island | Medium |