Skip to content

About

A collection of LeetCode questions to ace the coding interview!

Resources

Stars

3 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

188 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ LeetCode Solutions

Automatically synchronized using LeetVault

Problems Easy Medium Hard Languages


πŸ“Š Statistics

Metric Count
Problems Solved 46
Easy 13
Medium 23
Hard 6
Languages C, C++, Java, Python3
Last Sync 03 Nov 2026

πŸ“‚ Browse by Topic

Array (25)

# Problem Difficulty Solution
0748 Largest Number At Least Twice of Others 🟒 Easy View
1039 Find the Town Judge 🟒 Easy View
2301 Count Array Pairs Divisible by K πŸ”΄ Hard View
0054 Spiral Matrix 🟑 Medium View
0391 Perfect Rectangle πŸ”΄ Hard View
1428 Jump Game III 🟑 Medium View
2418 Minimum Sum of Squared Difference 🟑 Medium View
2844 Sum of Squares of Special Elements 🟒 Easy View
0692 Top K Frequent Words 🟑 Medium View
0169 Majority Element 🟒 Easy View
3153 Apply Operations on Array to Maximize Sum of Squares πŸ”΄ Hard View
4078 Maximum Alternating Sum of Squares 🟑 Medium View
3163 Subarrays Distinct Element Sum of Squares I 🟒 Easy View
3193 Maximum Strong Pair XOR I 🟒 Easy View
3139 Subarrays Distinct Element Sum of Squares II πŸ”΄ Hard View
3847 Minimum Swaps to Sort by Digit Sum 🟑 Medium View
1692 Number of Ways to Reorder Array to Get Same BST πŸ”΄ Hard View
2210 Find Target Indices After Sorting Array 🟒 Easy View
4184 Minimum Operations to Sort a Permutation 🟑 Medium View
3950 Maximum K to Sort a Permutation 🟑 Medium View
1380 Number of Closed Islands 🟑 Medium View
3823 Count Islands With Total Value Divisible by K 🟑 Medium View
4205 Minimum XOR Path in a Grid 🟑 Medium View
3938 Twisted Mirror Path Count 🟑 Medium View
0462 Minimum Moves to Equal Array Elements II 🟑 Medium View

Backtracking (1)

# Problem Difficulty Solution
0301 Remove Invalid Parentheses πŸ”΄ Hard View

Binary Indexed Tree (1)

# Problem Difficulty Solution
3139 Subarrays Distinct Element Sum of Squares II πŸ”΄ Hard View

Binary Search (2)

# Problem Difficulty Solution
2418 Minimum Sum of Squared Difference 🟑 Medium View
2210 Find Target Indices After Sorting Array 🟒 Easy View

Binary Search Tree (1)

# Problem Difficulty Solution
1692 Number of Ways to Reorder Array to Get Same BST πŸ”΄ Hard View

Binary Tree (1)

# Problem Difficulty Solution
1692 Number of Ways to Reorder Array to Get Same BST πŸ”΄ Hard View

Bit Manipulation (4)

# Problem Difficulty Solution
3153 Apply Operations on Array to Maximize Sum of Squares πŸ”΄ Hard View
3193 Maximum Strong Pair XOR I 🟒 Easy View
3950 Maximum K to Sort a Permutation 🟑 Medium View
4205 Minimum XOR Path in a Grid 🟑 Medium View

Boyer–Moore Majority Vote Algorithm (1)

# Problem Difficulty Solution
0169 Majority Element 🟒 Easy View

Bracket Sequences (5)

# Problem Difficulty Solution
0678 Valid Parenthesis String 🟑 Medium View
0886 Score of Parentheses 🟑 Medium View
0957 Minimum Add to Make Parentheses Valid 🟑 Medium View
1078 Remove Outermost Parentheses 🟒 Easy View
1648 Minimum Insertions to Balance a Parentheses String 🟑 Medium View

Breadth-First Search (5)

# Problem Difficulty Solution
0301 Remove Invalid Parentheses πŸ”΄ Hard View
2121 Find if Path Exists in Graph 🟒 Easy View
1428 Jump Game III 🟑 Medium View
1380 Number of Closed Islands 🟑 Medium View
3823 Count Islands With Total Value Divisible by K 🟑 Medium View

Bucket Sort (2)

# Problem Difficulty Solution
0451 Sort Characters By Frequency 🟑 Medium View
0692 Top K Frequent Words 🟑 Medium View

Combinatorics (1)

# Problem Difficulty Solution
1692 Number of Ways to Reorder Array to Get Same BST πŸ”΄ Hard View

Counting (4)

# Problem Difficulty Solution
2301 Count Array Pairs Divisible by K πŸ”΄ Hard View
0451 Sort Characters By Frequency 🟑 Medium View
0692 Top K Frequent Words 🟑 Medium View
0169 Majority Element 🟒 Easy View

Depth-First Search (4)

# Problem Difficulty Solution
2121 Find if Path Exists in Graph 🟒 Easy View
1428 Jump Game III 🟑 Medium View
1380 Number of Closed Islands 🟑 Medium View
3823 Count Islands With Total Value Divisible by K 🟑 Medium View

Divide and Conquer (2)

# Problem Difficulty Solution
0169 Majority Element 🟒 Easy View
1692 Number of Ways to Reorder Array to Get Same BST πŸ”΄ Hard View

Dynamic Programming (4)

# Problem Difficulty Solution
0678 Valid Parenthesis String 🟑 Medium View
1692 Number of Ways to Reorder Array to Get Same BST πŸ”΄ Hard View
4205 Minimum XOR Path in a Grid 🟑 Medium View
3938 Twisted Mirror Path Count 🟑 Medium View

Enumeration (1)

# Problem Difficulty Solution
2844 Sum of Squares of Special Elements 🟒 Easy View

Euclidean Algorithm (1)

# Problem Difficulty Solution
2301 Count Array Pairs Divisible by K πŸ”΄ Hard View

Fermat's Little Theorem (1)

# Problem Difficulty Solution
1692 Number of Ways to Reorder Array to Get Same BST πŸ”΄ Hard View

Geometry (1)

# Problem Difficulty Solution
0391 Perfect Rectangle πŸ”΄ Hard View

Graph Theory (4)

# Problem Difficulty Solution
1039 Find the Town Judge 🟒 Easy View
1916 Find Center of Star Graph 🟒 Easy View
2121 Find if Path Exists in Graph 🟒 Easy View
4104 Shortest Path With At Most K Consecutive Identical Characters 🟑 Medium View

Greatest Common Divisor (1)

# Problem Difficulty Solution
2301 Count Array Pairs Divisible by K πŸ”΄ Hard View

Greedy (7)

# Problem Difficulty Solution
0678 Valid Parenthesis String 🟑 Medium View
0957 Minimum Add to Make Parentheses Valid 🟑 Medium View
1648 Minimum Insertions to Balance a Parentheses String 🟑 Medium View
2418 Minimum Sum of Squared Difference 🟑 Medium View
3153 Apply Operations on Array to Maximize Sum of Squares πŸ”΄ Hard View
4078 Maximum Alternating Sum of Squares 🟑 Medium View
4084 Maximize Sum of Squares of Digits 🟑 Medium View

Hash Table (11)

# Problem Difficulty Solution
1039 Find the Town Judge 🟒 Easy View
2301 Count Array Pairs Divisible by K πŸ”΄ Hard View
0391 Perfect Rectangle πŸ”΄ Hard View
0451 Sort Characters By Frequency 🟑 Medium View
0692 Top K Frequent Words 🟑 Medium View
0169 Majority Element 🟒 Easy View
3153 Apply Operations on Array to Maximize Sum of Squares πŸ”΄ Hard View
3163 Subarrays Distinct Element Sum of Squares I 🟒 Easy View
3193 Maximum Strong Pair XOR I 🟒 Easy View
3139 Subarrays Distinct Element Sum of Squares II πŸ”΄ Hard View
3847 Minimum Swaps to Sort by Digit Sum 🟑 Medium View

Heap (Priority Queue) (4)

# Problem Difficulty Solution
2418 Minimum Sum of Squared Difference 🟑 Medium View
0451 Sort Characters By Frequency 🟑 Medium View
0692 Top K Frequent Words 🟑 Medium View
4104 Shortest Path With At Most K Consecutive Identical Characters 🟑 Medium View

Linked List (1)

# Problem Difficulty Solution
0061 Rotate List 🟑 Medium View

Math (7)

# Problem Difficulty Solution
2301 Count Array Pairs Divisible by K πŸ”΄ Hard View
0391 Perfect Rectangle πŸ”΄ Hard View
4084 Maximize Sum of Squares of Digits 🟑 Medium View
1692 Number of Ways to Reorder Array to Get Same BST πŸ”΄ Hard View
0507 Perfect Number 🟒 Easy View
2496 Count Days Spent Together 🟒 Easy View
0462 Minimum Moves to Equal Array Elements II 🟑 Medium View

Matrix (5)

# Problem Difficulty Solution
0054 Spiral Matrix 🟑 Medium View
1380 Number of Closed Islands 🟑 Medium View
3823 Count Islands With Total Value Divisible by K 🟑 Medium View
4205 Minimum XOR Path in a Grid 🟑 Medium View
3938 Twisted Mirror Path Count 🟑 Medium View

Memoization (1)

# Problem Difficulty Solution
1692 Number of Ways to Reorder Array to Get Same BST πŸ”΄ Hard View

Number Theory (1)

# Problem Difficulty Solution
2301 Count Array Pairs Divisible by K πŸ”΄ Hard View

Segment Tree (2)

# Problem Difficulty Solution
3163 Subarrays Distinct Element Sum of Squares I 🟒 Easy View
3139 Subarrays Distinct Element Sum of Squares II πŸ”΄ Hard View

Shortest Path (1)

# Problem Difficulty Solution
4104 Shortest Path With At Most K Consecutive Identical Characters 🟑 Medium View

Simulation (1)

# Problem Difficulty Solution
0054 Spiral Matrix 🟑 Medium View

Sliding Window (1)

# Problem Difficulty Solution
3193 Maximum Strong Pair XOR I 🟒 Easy View

Sorting (9)

# Problem Difficulty Solution
0748 Largest Number At Least Twice of Others 🟒 Easy View
2418 Minimum Sum of Squared Difference 🟑 Medium View
0451 Sort Characters By Frequency 🟑 Medium View
0692 Top K Frequent Words 🟑 Medium View
0169 Majority Element 🟒 Easy View
4078 Maximum Alternating Sum of Squares 🟑 Medium View
3847 Minimum Swaps to Sort by Digit Sum 🟑 Medium View
2210 Find Target Indices After Sorting Array 🟒 Easy View
0462 Minimum Moves to Equal Array Elements II 🟑 Medium View

Stack (5)

# Problem Difficulty Solution
0678 Valid Parenthesis String 🟑 Medium View
0886 Score of Parentheses 🟑 Medium View
0957 Minimum Add to Make Parentheses Valid 🟑 Medium View
1078 Remove Outermost Parentheses 🟒 Easy View
1648 Minimum Insertions to Balance a Parentheses String 🟑 Medium View

String (12)

# Problem Difficulty Solution
0678 Valid Parenthesis String 🟑 Medium View
0886 Score of Parentheses 🟑 Medium View
0957 Minimum Add to Make Parentheses Valid 🟑 Medium View
0301 Remove Invalid Parentheses πŸ”΄ Hard View
1078 Remove Outermost Parentheses 🟒 Easy View
1648 Minimum Insertions to Balance a Parentheses String 🟑 Medium View
0451 Sort Characters By Frequency 🟑 Medium View
0692 Top K Frequent Words 🟑 Medium View
4220 Minimum Operations to Sort a String 🟑 Medium View
0006 Zigzag Conversion 🟑 Medium View
2496 Count Days Spent Together 🟒 Easy View
4104 Shortest Path With At Most K Consecutive Identical Characters 🟑 Medium View

Sweep Line (1)

# Problem Difficulty Solution
0391 Perfect Rectangle πŸ”΄ Hard View

Tree (1)

# Problem Difficulty Solution
1692 Number of Ways to Reorder Array to Get Same BST πŸ”΄ Hard View

Trie (2)

# Problem Difficulty Solution
0692 Top K Frequent Words 🟑 Medium View
3193 Maximum Strong Pair XOR I 🟒 Easy View

Two Pointers (1)

# Problem Difficulty Solution
0061 Rotate List 🟑 Medium View

Uncategorized (5)

# Problem Difficulty Solution
4070 Minimum Rotations to Dial a Number I βšͺ Unknown View
4073 Count Good Strings βšͺ Unknown View
101198 Longest Resilient Subarray I βšͺ Unknown View
4086 Minimum Interval Selection to Cover Target Intervals βšͺ Unknown View
4342 Create Grid With Exactly One Path 🟒 Easy View

Union-Find (4)

# Problem Difficulty Solution
2121 Find if Path Exists in Graph 🟒 Easy View
1692 Number of Ways to Reorder Array to Get Same BST πŸ”΄ Hard View
1380 Number of Closed Islands 🟑 Medium View
3823 Count Islands With Total Value Divisible by K 🟑 Medium View

πŸ”₯ Recently Solved

Date Problem Difficulty Language
03 Nov 2026 Minimum Moves to Equal Array Elements II 🟑 Medium C++
01 Nov 2026 Twisted Mirror Path Count 🟑 Medium C++
30 Oct 2026 Shortest Path With At Most K Consecutive Identical Characters 🟑 Medium C++
29 Oct 2026 Minimum XOR Path in a Grid 🟑 Medium C++
28 Oct 2026 Create Grid With Exactly One Path 🟒 Easy C++
27 Oct 2026 Count Islands With Total Value Divisible by K 🟑 Medium C++
26 Oct 2026 Number of Closed Islands 🟑 Medium C++
24 Oct 2026 Count Days Spent Together 🟒 Easy C++
23 Oct 2026 Perfect Number 🟒 Easy Python3
23 Oct 2026 Zigzag Conversion 🟑 Medium C++

Generated using LeetVault.

About

A collection of LeetCode questions to ace the coding interview!

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages