LeetCode is a website that has programming-related questions that are designed to be solved in a limited amount of time. This repository is a collection of some of my solutions written in Rust.
No. | Title | Solution | Problem | Difficulty |
---|---|---|---|---|
1 | Two Sum | Rust | Leetcode | |
2 | Add Two Numbers | Rust | Leetcode | |
3 | Longest Substring Without Repeating Characters | Rust | Leetcode | |
5 | Longest Palindromic Substring | Rust | Leetcode | |
31 | Next Permutation | Rust | Leetcode | |
33 | Search in Rotated Sorted Array | Rust | Leetcode | |
34 | Find First and Last Position of Element in Sorted Array | Rust | Leetcode | |
37 | Sudoku Solver | Rust | Leetcode | |
42 | Trapping Rain Water | Rust | Leetcode | |
49 | Group Anagrams | Rust | Leetcode | |
51 | N-Queens | Rust | Leetcode | |
52 | N-Queens II | Rust | Leetcode | |
54 | Spiral Matrix | Rust | Leetcode | |
55 | Jump Game | Rust | Leetcode | |
56 | Merge Intervals | Rust | Leetcode | |
62 | Unique Paths | Rust | Leetcode | |
70 | Climbing Stairs | Rust | Leetcode | |
72 | Edit Distance | Rust | Leetcode | |
73 | Set Matrix Zeroes | Rust | Leetcode | |
75 | Sort Colors | Rust | Leetcode | |
93 | Restore IP Addresses | Rust | Leetcode | |
94 | Binary Tree Inorder Traversal | Rust | Leetcode | |
100 | Same Tree | Rust | Leetcode | |
103 | Binary Tree Zigzag Level Order Traversal | Rust | Leetcode | |
115 | Distinct Subsequences | Rust | Leetcode | |
123 | Best Time to Buy and Sell Stock III | Rust | Leetcode | |
134 | Gas Station | Rust | Leetcode | |
169 | Majority Element | Rust | Leetcode | |
174 | Dungeon Game | Rust | Leetcode | |
200 | Number of Islands | Rust | Leetcode | |
201 | Bitwise AND of Numbers Range | Rust | Leetcode | |
207 | Course Schedule | Rust | Leetcode | |
208 | Implement Trie (Prefix Tree) | Rust | Leetcode | |
210 | Course Schedule II | Rust | Leetcode | |
212 | Word Search II | Rust | Leetcode | |
230 | Kth Smallest Element in a BST | Rust | Leetcode | |
242 | Valid Anagram | Rust | Leetcode | |
253 | Meeting Rooms II | Rust | Leetcode | |
279 | Perfect Squares | Rust | Leetcode | |
282 | Expression Add Operators | Rust | Leetcode | |
302 | Smallest Rectangle Enclosing Black Pixels | Rust | Leetcode | |
309 | Best Time to Buy and Sell Stock with Cooldown | Rust | Leetcode | |
317 | Shortest Distance from All Buildings | Rust | Leetcode | |
322 | Coin Change | Rust | Leetcode | |
325 | Maximum Size Subarray Sum Equals k | Rust | Leetcode | |
334 | Increasing Triplet Subsequence | Rust | Leetcode | |
337 | House Robber III | Rust | Leetcode | |
350 | Intersection of Two Arrays II | Rust | Leetcode | |
368 | Largest Divisible Subset | Rust | Leetcode | |
374 | Guess Number Higher or Lower | Rust | Leetcode | |
387 | First Unique Character in a String | Rust | Leetcode | |
435 | Non-overlapping Intervals | Rust | Leetcode | |
437 | Path Sum III | Rust | Leetcode | |
442 | Find All Duplicates in an Array | Rust | Leetcode | |
452 | Minimum Number of Arrows to Burst Balloons | Rust | Leetcode | |
463 | Island Perimeter | Rust | Leetcode | |
465 | Optimal Account Balancing | Rust | Leetcode | |
485 | Max Consecutive Ones | Rust | Leetcode | |
495 | Teemo Attacking | Rust | Leetcode | |
496 | Next Greater Element I | Rust | Leetcode | |
516 | Longest Palindromic Subsequence | Rust | Leetcode | |
543 | Diameter of Binary Tree | Rust | Leetcode | |
547 | Number of Provinces | Rust | Leetcode | |
695 | Max Area of Island | Rust | Leetcode | |
696 | Count Binary Substrings | Rust | Leetcode | |
698 | Partition to K Equal Sum Subsets | Rust | Leetcode | |
713 | Subarray Product Less Than K | Rust | Leetcode | |
713 | Subarray Product Less Than K | Rust | Leetcode | |
725 | Split Linked List in Parts | Rust | Leetcode | |
741 | Cherry Pickup | Rust | Leetcode | |
749 | Contain Virus | Rust | Leetcode | |
764 | Largest Plus Sign | Rust | Leetcode | |
774 | Minimize Max Distance to Gas Station | Rust | Leetcode | |
815 | Bus Routes | Rust | Leetcode | |
841 | Keys and Rooms | Rust | Leetcode | |
875 | Koko Eating Bananas | Rust | Leetcode | |
901 | Online Stock Span | Rust | Leetcode | |
922 | Sort Array By Parity II | Rust | Leetcode | |
929 | Unique Email Addresses | Rust | Leetcode | |
930 | Binary Subarrays With Sum | Rust | Leetcode | |
937 | Reorder Data in Log Files | Rust | Leetcode | |
973 | K Closest Points to Origin | Rust | Leetcode | |
986 | Interval List Intersections | Rust | Leetcode | |
991 | Broken Calculator | Rust | Leetcode | |
993 | Cousins in Binary Tree | Rust | Leetcode | |
1008 | Construct Binary Search Tree from Preorder Traversal | Rust | Leetcode | |
1013 | Partition Array Into Three Parts With Equal Sum | Rust | Leetcode | |
1035 | Uncrossed Lines | Rust | Leetcode | |
1041 | Robot Bounded In Circle | Rust | Leetcode | |
1086 | High Five | Rust | Leetcode | |
1134 | Armstrong Number | Rust | Leetcode | |
1135 | Connecting Cities With Minimum Cost | Rust | Leetcode | |
1137 | N-th Tribonacci Number | Rust | Leetcode | |
1143 | Longest Common Subsequence | Rust | Leetcode | |
1161 | Maximum Level Sum of a Binary Tree | Rust | Leetcode | |
1167 | Minimum Cost to Connect Sticks | Rust | Leetcode | |
1197 | Minimum Knight Moves | Rust | Leetcode | |
1216 | Valid Palindrome III | Rust | Leetcode | |
1239 | Maximum Length of a Concatenated String with Unique Characters | Rust | Leetcode | |
1268 | Search Suggestions System | Rust | Leetcode | |
1275 | Find Winner on a Tic Tac Toe Game | Rust | Leetcode | |
1293 | Shortest Path in a Grid with Obstacles Elimination | Rust | Leetcode | |
1315 | Sum of Nodes with Even-Valued Grandparent | Rust | Leetcode | |
1315 | Sum of Nodes with Even-Valued Grandparent | Rust | Leetcode | |
1328 | Break a Palindrome | Rust | Leetcode | |
1400 | Construct K Palindrome Strings | Rust | Leetcode | |
1428 | Leftmost Column with at Least a One | Rust | Leetcode | |
1457 | Pseudo-Palindromic Paths in a Binary Tree | Rust | Leetcode | |
1481 | Least Number of Unique Integers after K Removals | Rust | Leetcode | |
1570 | Dot Product of Two Sparse Vectors | Rust | Leetcode | |
1604 | Alert Using Same Key-Card Three or More Times in a One Hour Period | Rust | Leetcode | |
1710 | Maximum Units on a Truck | Rust | Leetcode | |
1743 | Restore the Array From Adjacent Pairs | Rust | Leetcode | |
1801 | Number of Orders in the Backlog | Rust | Leetcode | |
1861 | Rotating the Box | Rust | Leetcode | |
1962 | Remove Stones to Minimize the Total | Rust | Leetcode | |
2022 | Convert 1D Array Into 2D Array | Rust | Leetcode | |
2023 | Number of Pairs of Strings With Concatenation Equal to Target | Rust | Leetcode | |
2024 | Maximize the Confusion of an Exam | Rust | Leetcode | |
2025 | Maximum Number of Ways to Partition an Array | Rust | Leetcode | |
2027 | Minimum Moves to Convert String | Rust | Leetcode | |
2028 | Find Missing Observations | Rust | Leetcode | |
2032 | Two Out of Three | Rust | Leetcode | |
2033 | Minimum Operations to Make a Uni-Value Grid | Rust | Leetcode | |
2034 | Stock Price Fluctuation | Rust | Leetcode | |
2042 | Check if Numbers Are Ascending in a Sentence | Rust | Leetcode | |
2043 | Simple Bank System | Rust | Leetcode | |
2044 | Count Number of Maximum Bitwise-OR Subsets | Rust | Leetcode | |
2045 | Second Minimum Time to Reach Destination | Rust | Leetcode | |
5885 | Minimum Number of Moves to Seat Everyone | Rust | Leetcode | |
5886 | Remove Colored Pieces if Both Neighbors are the Same Color | Rust | Leetcode | |
5888 | The Time When the Network Becomes Idle | Rust | Leetcode |