# LeetCode **Repository Path**: fiveooo/LeetCode ## Basic Information - **Project Name**: LeetCode - **Description**: No description available - **Primary Language**: C++ - **License**: MIT - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-12-04 - **Last Updated**: 2021-12-04 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # LeetCode C++ Solution | # | Title | Solution | Difficulty | |---| ----- | -------- | ---------- | |1143|[Longest Common Subsequence](https://leetcode.com/problems/longest-common-subsequence)|[longest-common-subsequence.cpp](longest-common-subsequence.cpp)|Medium| |1011|[Capacity To Ship Packages Within D Days](https://leetcode.com/problems/capacity-to-ship-packages-within-d-days)|[capacity-to-ship-packages-within-d-days.cpp](capacity-to-ship-packages-within-d-days.cpp)|Medium| |875|[Koko Eating Bananas](https://leetcode.com/problems/koko-eating-bananas)|[koko-eating-bananas.cpp](koko-eating-bananas.cpp)|Medium| |695|[Max Area of Island](https://leetcode.com/problems/max-area-of-island)|[max-area-of-island.cpp](max-area-of-island.cpp)|Medium| |415|[Add Strings](https://leetcode.com/problems/add-strings)|[add-strings.cpp](add-strings.cpp)|Easy| |350|[Intersection of Two Arrays II](https://leetcode.com/problems/intersection-of-two-arrays-ii)|[intersection-of-two-arrays-ii.cpp](intersection-of-two-arrays-ii.cpp)|Easy| |337|[House Robber III](https://leetcode.com/problems/house-robber-iii)|[house-robber-iii.cpp](house-robber-iii.cpp)|Medium| |322|[Coin Change](https://leetcode.com/problems/coin-change)|[coin-change.cpp](coin-change.cpp)|Medium| |300|[Longest Increasing Subsequence](https://leetcode.com/problems/longest-increasing-subsequence)|[longest-increasing-subsequence.cpp](longest-increasing-subsequence.cpp)|Medium| |279|[Perfect Squares](https://leetcode.com/problems/perfect-squares)|[perfect-squares.cpp](perfect-squares.cpp)|Medium| |239|[Sliding Window Maximum](https://leetcode.com/problems/sliding-window-maximum)|[sliding-window-maximum.cpp](sliding-window-maximum.cpp)|Hard| |237|[Delete Node in a Linked List](https://leetcode.com/problems/delete-node-in-a-linked-list)|[delete-node-in-a-linked-list.cpp](delete-node-in-a-linked-list.cpp)|Easy| |234|[Palindrome Linked List](https://leetcode.com/problems/palindrome-linked-list)|[palindrome-linked-list.cpp](palindrome-linked-list.cpp)|Easy| |230|[Kth Smallest Element in a BST](https://leetcode.com/problems/kth-smallest-element-in-a-bst)|[kth-smallest-element-in-a-bst.cpp](kth-smallest-element-in-a-bst.cpp)|Medium| |215|[Kth Largest Element in an Array](https://leetcode.com/problems/kth-largest-element-in-an-array)|[kth-largest-element-in-an-array.cpp](kth-largest-element-in-an-array.cpp)|Medium| |213|[House Robber II](https://leetcode.com/problems/house-robber-ii)|[house-robber-ii.cpp](house-robber-ii.cpp)|Medium| |206|[Reverse Linked List](https://leetcode.com/problems/reverse-linked-list)|[reverse-linked-list.cpp](reverse-linked-list.cpp)|Easy| |200|[Number of Islands](https://leetcode.com/problems/number-of-islands)|[number-of-islands.cpp](number-of-islands.cpp)|Medium| |198|[House Robber](https://leetcode.com/problems/house-robber)|[house-robber.cpp](house-robber.cpp)|Medium| |160|[Intersection of Two Linked Lists](https://leetcode.com/problems/intersection-of-two-linked-lists)|[intersection-of-two-linked-lists.cpp](intersection-of-two-linked-lists.cpp)|Easy| |152|[Maximum Product Subarray](https://leetcode.com/problems/maximum-product-subarray)|[maximum-product-subarray.cpp](maximum-product-subarray.cpp)|Medium| |146|[LRU Cache](https://leetcode.com/problems/lru-cache)|[lru-cache.cpp](lru-cache.cpp)|Medium| |142|[Linked List Cycle II](https://leetcode.com/problems/linked-list-cycle-ii)|[linked-list-cycle-ii.cpp](linked-list-cycle-ii.cpp)|Medium| |141|[Linked List Cycle](https://leetcode.com/problems/linked-list-cycle)|[linked-list-cycle.cpp](linked-list-cycle.cpp)|Easy| |139|[Word Break](https://leetcode.com/problems/word-break)|[word-break.cpp](word-break.cpp)|Medium| |124|[Binary Tree Maximum Path Sum](https://leetcode.com/problems/binary-tree-maximum-path-sum)|[binary-tree-maximum-path-sum.cpp](binary-tree-maximum-path-sum.cpp)|Hard| |121|[Best Time to Buy and Sell Stock](https://leetcode.com/problems/best-time-to-buy-and-sell-stock)|[best-time-to-buy-and-sell-stock.cpp](best-time-to-buy-and-sell-stock.cpp)|Easy| |113|[Path Sum II](https://leetcode.com/problems/path-sum-ii)|[path-sum-ii.cpp](path-sum-ii.cpp)|Medium| |112|[Path Sum](https://leetcode.com/problems/path-sum)|[path-sum.cpp](path-sum.cpp)|Easy| |111|[Minimum Depth of Binary Tree](https://leetcode.com/problems/minimum-depth-of-binary-tree)|[minimum-depth-of-binary-tree.cpp](minimum-depth-of-binary-tree.cpp)|Easy| |110|[Balanced Binary Tree](https://leetcode.com/problems/balanced-binary-tree)|[balanced-binary-tree.cpp](balanced-binary-tree.cpp)|Easy| |108|[Convert Sorted Array to Binary Search Tree](https://leetcode.com/problems/convert-sorted-array-to-binary-search-tree)|[convert-sorted-array-to-binary-search-tree.cpp](convert-sorted-array-to-binary-search-tree.cpp)|Easy| |107|[Binary Tree Level Order Traversal II](https://leetcode.com/problems/binary-tree-level-order-traversal-ii)|[binary-tree-level-order-traversal-ii.cpp](binary-tree-level-order-traversal-ii.cpp)|Medium| |106|[Construct Binary Tree from Inorder and Postorder Traversal](https://leetcode.com/problems/construct-binary-tree-from-inorder-and-postorder-traversal)|[construct-binary-tree-from-inorder-and-postorder-traversal.cpp](construct-binary-tree-from-inorder-and-postorder-traversal.cpp)|Medium| |105|[Construct Binary Tree from Preorder and Inorder Traversal](https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal)|[construct-binary-tree-from-preorder-and-inorder-traversal.cpp](construct-binary-tree-from-preorder-and-inorder-traversal.cpp)|Medium| |104|[Maximum Depth of Binary Tree](https://leetcode.com/problems/maximum-depth-of-binary-tree)|[maximum-depth-of-binary-tree.cpp](maximum-depth-of-binary-tree.cpp)|Easy| |103|[Binary Tree Zigzag Level Order Traversal](https://leetcode.com/problems/binary-tree-zigzag-level-order-traversal)|[binary-tree-zigzag-level-order-traversal.cpp](binary-tree-zigzag-level-order-traversal.cpp)|Medium| |102|[Binary Tree Level Order Traversal](https://leetcode.com/problems/binary-tree-level-order-traversal)|[binary-tree-level-order-traversal.cpp](binary-tree-level-order-traversal.cpp)|Medium| |101|[Symmetric Tree](https://leetcode.com/problems/symmetric-tree)|[symmetric-tree.cpp](symmetric-tree.cpp)|Easy| |100|[Same Tree](https://leetcode.com/problems/same-tree)|[same-tree.cpp](same-tree.cpp)|Easy| |99|[Recover Binary Search Tree](https://leetcode.com/problems/recover-binary-search-tree)|[recover-binary-search-tree.cpp](recover-binary-search-tree.cpp)|Medium| |98|[Validate Binary Search Tree](https://leetcode.com/problems/validate-binary-search-tree)|[validate-binary-search-tree.cpp](validate-binary-search-tree.cpp)|Medium| |96|[Unique Binary Search Trees](https://leetcode.com/problems/unique-binary-search-trees)|[unique-binary-search-trees.cpp](unique-binary-search-trees.cpp)|Medium| |94|[Binary Tree Inorder Traversal](https://leetcode.com/problems/binary-tree-inorder-traversal)|[binary-tree-inorder-traversal.cpp](binary-tree-inorder-traversal.cpp)|Easy| |93|[Restore IP Addresses](https://leetcode.com/problems/restore-ip-addresses)|[restore-ip-addresses.cpp](restore-ip-addresses.cpp)|Medium| |92|[Reverse Linked List II](https://leetcode.com/problems/reverse-linked-list-ii)|[reverse-linked-list-ii.cpp](reverse-linked-list-ii.cpp)|Medium| |91|[Decode Ways](https://leetcode.com/problems/decode-ways)|[decode-ways.cpp](decode-ways.cpp)|Medium| |75|[Sort Colors](https://leetcode.com/problems/sort-colors)|[sort-colors.cpp](sort-colors.cpp)|Medium| |70|[Climbing Stairs](https://leetcode.com/problems/climbing-stairs)|[climbing-stairs.cpp](climbing-stairs.cpp)|Easy| |69|[Sqrt(x)](https://leetcode.com/problems/sqrtx)|[sqrtx.cpp](sqrtx.cpp)|Easy| |66|[Plus One](https://leetcode.com/problems/plus-one)|[plus-one.cpp](plus-one.cpp)|Easy| |62|[Unique Paths](https://leetcode.com/problems/unique-paths)|[unique-paths.cpp](unique-paths.cpp)|Medium| |53|[Maximum Subarray](https://leetcode.com/problems/maximum-subarray)|[maximum-subarray.cpp](maximum-subarray.cpp)|Easy| |48|[Rotate Image](https://leetcode.com/problems/rotate-image)|[rotate-image.cpp](rotate-image.cpp)|Medium| |42|[Trapping Rain Water](https://leetcode.com/problems/trapping-rain-water)|[trapping-rain-water.cpp](trapping-rain-water.cpp)|Hard| |34|[Find First and Last Position of Element in Sorted Array](https://leetcode.com/problems/find-first-and-last-position-of-element-in-sorted-array)|[find-first-and-last-position-of-element-in-sorted-array.cpp](find-first-and-last-position-of-element-in-sorted-array.cpp)|Medium| |33|[Search in Rotated Sorted Array](https://leetcode.com/problems/search-in-rotated-sorted-array)|[search-in-rotated-sorted-array.cpp](search-in-rotated-sorted-array.cpp)|Medium| |28|[Implement strStr()](https://leetcode.com/problems/implement-strstr)|[implement-strstr.cpp](implement-strstr.cpp)|Easy| |26|[Remove Duplicates from Sorted Array](https://leetcode.com/problems/remove-duplicates-from-sorted-array)|[remove-duplicates-from-sorted-array.cpp](remove-duplicates-from-sorted-array.cpp)|Easy| |25|[Reverse Nodes in k-Group](https://leetcode.com/problems/reverse-nodes-in-k-group)|[reverse-nodes-in-k-group.cpp](reverse-nodes-in-k-group.cpp)|Hard| |24|[Swap Nodes in Pairs](https://leetcode.com/problems/swap-nodes-in-pairs)|[swap-nodes-in-pairs.cpp](swap-nodes-in-pairs.cpp)|Medium| |23|[Merge k Sorted Lists](https://leetcode.com/problems/merge-k-sorted-lists)|[merge-k-sorted-lists.cpp](merge-k-sorted-lists.cpp)|Hard| |22|[Generate Parentheses](https://leetcode.com/problems/generate-parenthesesk)|[generate-parenthesesk.cpp](generate-parenthesesk.cpp)|Medium| |21|[Merge Two Sorted Lists](https://leetcode.com/problems/merge-two-sorted-lists)|[merge-two-sorted-lists.cpp](merge-two-sorted-lists.cpp)|Easy| |20|[Valid Parentheses](https://leetcode.com/problems/valid-parentheses)|[valid-parentheses.cpp](valid-parentheses.cpp)|Easy| |19|[Remove Nth Node From End of List](https://leetcode.com/problems/remove-nth-node-from-end-of-list)|[remove-nth-node-from-end-of-list.cpp](remove-nth-node-from-end-of-list.cpp)|Medium| |18|[4Sum](https://leetcode.com/problems/4sum)|[4sum.cpp](4sum.cpp)|Medium| |17|[Letter Combinations of a Phone Number](https://leetcode.com/problems/letter-combinations-of-a-phone-number)|[letter-combinations-of-a-phone-number.cpp](letter-combinations-of-a-phone-number.cpp)|Medium| |16|[3Sum Closest](https://leetcode.com/problems/3sum-closest)|[3sum-closest.cpp](3sum-closest.cpp)|Medium| |15|[3Sum](https://leetcode.com/problems/3sum)|[3sum.cpp](3sum.cpp)|Medium| |14|[Longest Common Prefix](https://leetcode.com/problems/longest-common-prefix)|[longest-common-prefix.cpp](longest-common-prefix.cpp)|Easy| |13|[Roman to Integer](https://leetcode.com/problems/roman-to-integer)|[roman-to-integer.cpp](roman-to-integer.cpp)|Easy| |12|[Integer to Roman](https://leetcode.com/problems/integer-to-roman)|[integer-to-roman.cpp](integer-to-roman.cpp)|Medium| |11|[Container With Most Water](https://leetcode.com/problems/container-with-most-water)|[container-with-most-water.cpp](container-with-most-water.cpp)|Medium| |10|[Regular Expression Matching](https://leetcode.com/problems/regular-expression-matching)|[regular-expression-matching.cpp](regular-expression-matching.cpp)|Hard| |9|[Palindrome Number](https://leetcode.com/problems/palindrome-number)|[palindrome-number.cpp](palindrome-number.cpp)|Easy| |8|[String to Integer (atoi)](https://leetcode.com/problems/string-to-integer-atoi)|[string-to-integer-atoi.cpp](string-to-integer-atoi.cpp)|Medium| |7|[Reverse Integer](https://leetcode.com/problems/reverse-integer)|[reverse-integer.cpp](reverse-integer.cpp)|Easy| |6|[ZigZag Conversion](https://leetcode.com/problems/zigzag-conversion)|[zigzag-conversion.cpp](zigzag-conversion.cpp)|Medium| |5|[Longest Palindromic Substring](https://leetcode.com/problems/longest-palindromic-substring)|[longest-palindromic-substring.cpp](longest-palindromic-substring.cpp)|Medium| |4|[Median of Two Sorted Arrays](https://leetcode.com/problems/median-of-two-sorted-arrays)|[median-of-two-sorted-arrays.cpp](median-of-two-sorted-arrays.cpp)|Hard| |3|[Longest Substring Without Repeating Characters](https://leetcode.com/problems/longest-substring-without-repeating-characters)|[longest-substring-without-repeating-characters.cpp](longest-substring-without-repeating-characters.cpp)|Medium| |2|[Add Two Numbers](https://leetcode.com/problems/add-two-numbers)|[add-two-numbers.cpp](add-two-numbers.cpp)|Medium| |1|[Two Sum](https://leetcode.com/problems/two-sum)|[two-sum.cpp](two-sum.cpp)|Easy|