Skip to content

roeishc/leetcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

99 Commits
 
 
 
 
 
 

Repository files navigation

LeetCode

LeetCode profile

Solutions to the LeetCode problems I solved/studied so far:

# Title Solution Difficulty Notes
13 Roman to Integer Python3 Easy
41 First Missing Positive C Hard
69 Sqrt(x) Java Easy
75 Sort Colors Python3, Python3 Medium Counting Sort (two-pass),
Two pointers (one-pass)
78 Subsets Python3 Medium
94 Binary Tree Inorder Traversal Java Easy
118 Pascal's Triangle Python3 Easy
131 Palindrome Partitioning Python3 Medium
136 Single Number C Easy
137 Single Number II C Medium
140 Word Break II Python3 Hard
141 Linked List Cycle Java Easy
165 Compare Version Numbers Python3 Medium
206 Reverse Linked List C Easy
215 Kth Largest Element in an Array Python3 Medium One liner
237 Delete Node in a Linked List Python3 Medium
260 Single Number III C Medium
287 Find the Duplicate Number C Medium Floyd's cycle detection
330 Patching Array Python3 Hard Mathematical properties
338 Counting Bits C Easy
344 Reverse String C Easy
350 Intersection of Two Arrays II Python3 Easy
409 Longest Palindrome Python3 Easy
502 IPO Python3 Hard
506 Relative Ranks Python3 Easy
523 Continuous Subarray Sum Java Medium Mathematical properties
552 Student Attendance Record II Java Hard
633 Sum of Square Numbers Python3 Medium Mathematical properties
648 Replace Words Python3 Medium
771 Jewels and Stones Python3 Easy
786 K-th Smallest Prime Fraction C Medium
826 Most Profit Assigning Work Python3 Medium
846 Hand of Straights Python3 Medium
857 Minimum Cost to Hire K Workers Python3 Hard
861 Score After Flipping Matrix Python3 Medium
881 Boats to Save People Python3 Medium
938 Range Sum of BST C Easy
945 Minimum Increment to Make Array Unique Python3 Medium
974 Subarray Sum Divisible by K Java, Python3 Medium
979 Distribute Coins in Binary Tree C Medium DFS
995 Minimum Number of K Consecutive Bit Flips Python3 Hard Sliding Window &
Bit Manipulation
Great editorial
1002 Find Common Characters Java Easy
1038 Binary Search Tree to Greater Sum Tree Python3 Medium BST, DFS
1051 Height Checker Java, Python3 Easy Counting Sort
1052 Grumpy Bookstore Owner Python3 Medium Sliding Window
1122 Relative Sort Array Python3 Easy
1208 Get Equal Substrings Within Budget C Medium Sliding Window
1219 Path with Maximum Gold Java Medium DFS & Backtracking
1248 Count Number of Nice Subarrays Python3 Medium Sliding Window
1255 Maximum Score Words Formed by Letters C Hard
1325 Delete Leaves With a Given Value C Medium DFS
1342 Number of Steps to Reduce a Number to Zero Python3 Easy
1382 Balance a Binary Search Tree Python3 Medium
1404 Number of Steps to Reduce a Number in Binary Representation to One C Medium
1438 Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit Python3 Medium Sliding Window with 2 Heaps
1442 Count Triplets That Can Form Two Arrays of Equal XOR C Medium
1480 Running Sum of 1d Array Java Easy
1482 Minimum Number of Days to Make m Bouquets Python3 Medium
1486 XOR Operation in an Array Python3 Easy
1509 Minimum Difference Between Largest and Smallest Value in Three Moves Python3 Medium
1512 Number of Good Pairs Go Easy
1518 Water Bottles Python3 Easy Mathematical properties
1550 Three Consecutive Odds Python3 Easy
1552 Magnetic Force Between Two Balls Python3 Medium Binary Search
1579 Remove Max Number of Edges to Keep Graph Fully Traversable Python3 Hard Union Find, Graph
1641 Count Sorted Vowel Strings Python3 Medium Dynamic Programming
1608 Special Array With X Elements Greater Than or Equal X Python3, C Easy Python3: Sorting
C: Suffix Sum
1684 Count the Number of Consistent Strings Python3 Easy
1689 Partitioning Into Minimum Number of Deci-Binary Numbers Java Medium
1701 Average Waiting Time Python3 Medium
1720 Decode XORed Array Python3 Easy
1791 Find Center of Star Graph Python3 Easy
1823 Find the Winner of the Circular Game Python3 Medium Mathematical properties
1863 Sum of All Subset XOR Totals Java, C Easy Java: trivial, inefficient
C: Black magic AKA bit manipulation
2000 Reverse Prefix of Word C Easy
2037 Minimum Number of Moves to Seat Everyone Python3 Easy
2058 Find the Minimum and Maximum Number of Nodes Between Critical Points Python3 Medium
2181 Merge Nodes in Between Zeros Python3 Medium
2192 All Ancestors of a Node in a Directed Acyclic Graph Python3 Medium
2220 Minimum Bit Flips to Convert Number Python3 Easy
2285 Maximum Total Importance of Roads Python3 Medium Undirected Graph, Greedy
2331 Evaluate Boolean Binary Tree C Easy
2373 Largest Local Value in a Matrix Java Easy
2441 Largest Positive Integer That Exists With Its Negative Python3 Easy
2469 Convert the Temperature Go Easy
2486 Append Characters to String to Make Subsequence C Medium
2487 Remove Nodes From Linked List Java Medium Monotonic Stack
2574 Left and Right Sum Differences Java Easy
2582 Pass the Pillow Python3 Easy Mathematical properties
2597 The Number of Beautiful Subsets Python3 Medium Backtracking
2657 Find the Prefix Common Array of Two Arrays Java Medium
2812 Find the Safest Path in a Grid Java Medium Multi-source BFS
2816 Double a Number Represented as a Linked List C Medium
2859 Sum of Values at Indices With K Set Bits Python3 Easy
2886 Change Data Type Python3 Easy
2952 Minimum Number of Coins to be Added Python3 Medium Mathematical properties
3068 Find the Maximum Sum of Node Values C Hard
3075 Maximize Happiness of Selected Children Java, Python3 Medium Java: Max Heap
Python3: Sorting
3110 Score of a String Java Easy

About

LeetCode solutions

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published