{"id":16779103,"url":"https://github.com/liby/leetcode","last_synced_at":"2025-03-16T19:43:54.780Z","repository":{"id":50388796,"uuid":"405145427","full_name":"liby/leetcode","owner":"liby","description":"Rust Solution","archived":false,"fork":false,"pushed_at":"2022-08-02T09:56:58.000Z","size":100,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-10T14:56:39.001Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/liby.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-09-10T16:30:13.000Z","updated_at":"2022-01-10T15:41:26.000Z","dependencies_parsed_at":"2022-09-15T18:02:59.894Z","dependency_job_id":null,"html_url":"https://github.com/liby/leetcode","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liby%2Fleetcode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liby%2Fleetcode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liby%2Fleetcode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liby%2Fleetcode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/liby","download_url":"https://codeload.github.com/liby/leetcode/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243923069,"owners_count":20369484,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T07:29:21.728Z","updated_at":"2025-03-16T19:43:54.756Z","avatar_url":"https://github.com/liby.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rust Solution\n\n1. [Two Sum](https://github.com/liby/leetcode/blob/main/solutions/1.two-sum.rs)\n2. [Reverse Integer](https://github.com/liby/leetcode/blob/main/solutions/7.reverse-integer.rs)\n3. [Palindrome Number](https://github.com/liby/leetcode/blob/main/solutions/9.palindrome-number.rs)\n4. [Roman to Integer](https://github.com/liby/leetcode/blob/main/solutions/13.roman-to-integer.rs)\n5. [Longest Common Prefix](https://github.com/liby/leetcode/blob/main/solutions/14.longest-common-prefix.rs)\n6. [Valid Parentheses](https://github.com/liby/leetcode/blob/main/solutions/20.valid-parentheses.rs)\n7. [Merge Two Sorted Lists](https://github.com/liby/leetcode/blob/main/solutions/21.merge-two-sorted-lists.rs)\n8. [Remove Duplicates from Sorted Array](https://github.com/liby/leetcode/blob/main/solutions/26.remove-duplicates-from-sorted-array.rs)\n9. [Remove Element](https://github.com/liby/leetcode/blob/main/solutions/27.remove-element.rs)\n10. [Implement strStr()](https://github.com/liby/leetcode/blob/main/solutions/28.implement-str-str.rs)\n11. [Search Insert Position](https://github.com/liby/leetcode/blob/main/solutions/35.search-insert-position.rs)\n12. [Maximum Subarray](https://github.com/liby/leetcode/blob/main/solutions/53.maximum-subarray.rs)\n13. [Length of Last Word](https://github.com/liby/leetcode/blob/main/solutions/58.length-of-last-word.rs)\n14. [Plus One](https://github.com/liby/leetcode/blob/main/solutions/66.plus-one.rs)\n15. [Add Binary](https://github.com/liby/leetcode/blob/main/solutions/67.add-binary.rs)\n16. [Sqrt(x)](https://github.com/liby/leetcode/blob/main/solutions/69.sqrt-x.rs)\n17. [Climbing Stairs](https://github.com/liby/leetcode/blob/main/solutions/70.climbing-stairs.rs)\n18. [Remove Duplicates from Sorted List](https://github.com/liby/leetcode/blob/main/solutions/83.remove-duplicates-from-sorted-list.rs)\n19. [Merge Sorted Array](https://github.com/liby/leetcode/blob/main/solutions/88.merge-sorted-array.rs)\n20. [Binary Tree Inorder Traversal](https://github.com/liby/leetcode/blob/main/solutions/94.binary-tree-inorder-traversal.rs)\n21. [Same Tree](https://github.com/liby/leetcode/blob/main/solutions/100.same-tree.rs)\n22. [Symmetric Tree](https://github.com/liby/leetcode/blob/main/solutions/101.symmetric-tree.rs)\n23. [Maximum Depth of Binary Tree](https://github.com/liby/leetcode/blob/main/solutions/104.maximum-depth-of-binary-tree.rs)\n24. [Best Time to Buy and Sell Stock](https://github.com/liby/leetcode/blob/main/solutions/121.best-time-to-buy-and-sell-stock.rs)\n25. [Valid Palindrome](https://github.com/liby/leetcode/blob/main/solutions/125.valid-palindrome.rs)\n26. [Two Sum II - Input array is sorted](https://github.com/liby/leetcode/blob/main/solutions/167.two-sum-ii-input-array-is-sorted.rs)\n27. [Excel Sheet Column Title](https://github.com/liby/leetcode/blob/main/solutions/168.excel-sheet-column-title.rs)\n28. [Majority Element](https://github.com/liby/leetcode/blob/main/solutions/169.majority-element.rs)\n29. [Excel Sheet Column Number](https://github.com/liby/leetcode/blob/main/solutions/171.excel-sheet-column-number.rs)\n30. [Factorial Trailing Zeroes](https://github.com/liby/leetcode/blob/main/solutions/172.factorial-trailing-zeroes.rs)\n31. [Reverse Bits](https://github.com/liby/leetcode/blob/main/solutions/190.reverse-bits.rs)\n32. [Number of 1 Bits](https://github.com/liby/leetcode/blob/main/solutions/191.number-of-1-bits.rs)\n33. [Happy Number](https://github.com/liby/leetcode/blob/main/solutions/202.happy-number.rs)\n34. [Count Primes](https://github.com/liby/leetcode/blob/main/solutions/204.count-primes.rs)\n35. [Contains Duplicate](https://github.com/liby/leetcode/blob/main/solutions/217.contains-duplicate.rs)\n36. [Contains Duplicate II](https://github.com/liby/leetcode/blob/main/solutions/219.contains-duplicate-ii.rs)\n37. [Summary Ranges](https://github.com/liby/leetcode/blob/main/solutions/228.summary-ranges.rs)\n38. [Power of Two](https://github.com/liby/leetcode/blob/main/solutions/231.power-of-two.rs)\n39. [Valid Anagram](https://github.com/liby/leetcode/blob/main/solutions/242.valid-anagram.rs)\n40. [Add Digits](https://github.com/liby/leetcode/blob/main/solutions/258.add-digits.rs)\n41. [Ugly Number](https://github.com/liby/leetcode/blob/main/solutions/263.ugly-number.rs)\n42. [Missing Number](https://github.com/liby/leetcode/blob/main/solutions/268.missing-number.rs)\n43. [First Bad Version](https://github.com/liby/leetcode/blob/main/solutions/278.first-bad-version.rs)\n44. [Move Zeroes](https://github.com/liby/leetcode/blob/main/solutions/283.move-zeroes.rs)\n45. [Nim Game](https://github.com/liby/leetcode/blob/main/solutions/292.nim-game.rs)\n46. [Range Sum Query - Immutable](https://github.com/liby/leetcode/blob/main/solutions/303.range-sum-query-immutable.rs)\n47. [Power of Three](https://github.com/liby/leetcode/blob/main/solutions/326.power-of-three.rs)\n48. [Counting Bits](https://github.com/liby/leetcode/blob/main/solutions/338.counting-bits.rs)\n49. [Power of Four](https://github.com/liby/leetcode/blob/main/solutions/342.power-of-four.rs)\n50. [Reverse String](https://github.com/liby/leetcode/blob/main/solutions/344.reverse-string.rs)\n51. [Reverse Vowels of a String](https://github.com/liby/leetcode/blob/main/solutions/345.reverse-vowels-of-a-string.rs)\n52. [Intersection of Two Arrays](https://github.com/liby/leetcode/blob/main/solutions/349.intersection-of-two-arrays.rs)\n53. [Valid Perfect Square](https://github.com/liby/leetcode/blob/main/solutions/367.valid-perfect-square.rs)\n54. [Guess Number Higher or Lower](https://github.com/liby/leetcode/blob/main/solutions/374.guess-number-higher-or-lower.rs)\n55. [Ransom Note](https://github.com/liby/leetcode/blob/main/solutions/383.ransom-note.rs)\n56. [First Unique Character in a String](https://github.com/liby/leetcode/blob/main/solutions/387.first-unique-character-in-a-string.rs)\n57. [Find the Difference](https://github.com/liby/leetcode/blob/main/solutions/389.find-the-difference.rs)\n58. [Is Subsequence](https://github.com/liby/leetcode/blob/main/solutions/392.is-subsequence.rs)\n59. [Binary Watch](https://github.com/liby/leetcode/blob/main/solutions/401.binary-watch.rs)\n60. [Sum of Left Leaves](https://github.com/liby/leetcode/blob/main/solutions/404.sum-of-left-leaves.rs)\n61. [Convert a Number to Hexadecimal](https://github.com/liby/leetcode/blob/main/solutions/405.convert-a-number-to-hexadecimal.rs)\n62. [Longest Palindrome](https://github.com/liby/leetcode/blob/main/solutions/409.longest-palindrome.rs)\n63. [Fizz Buzz](https://github.com/liby/leetcode/blob/main/solutions/412.fizz-buzz.rs)\n64. [Third Maximum Number](https://github.com/liby/leetcode/blob/main/solutions/414.third-maximum-number.rs)\n65. [Add Strings](https://github.com/liby/leetcode/blob/main/solutions/415.add-strings.rs)\n66. [Number of Segments in a String](https://github.com/liby/leetcode/blob/main/solutions/434.number-of-segments-in-a-string.rs)\n67. [Arranging Coins](https://github.com/liby/leetcode/blob/main/solutions/441.arranging-coins.rs)\n68. [Find All Numbers Disappeared in an Array](https://github.com/liby/leetcode/blob/main/solutions/448.find-all-numbers-disappeared-in-an-array.rs)\n69. [Assign Cookies](https://github.com/liby/leetcode/blob/main/solutions/455.assign-cookies.rs)\n70. [Hamming Distance](https://github.com/liby/leetcode/blob/main/solutions/461.hamming-distance.rs)\n71. [Island Perimeter](https://github.com/liby/leetcode/blob/main/solutions/463.island-perimeter.rs)\n72. [Number Complement](https://github.com/liby/leetcode/blob/main/solutions/476.number-complement.rs)\n73. [License Key Formatting](https://github.com/liby/leetcode/blob/main/solutions/482.license-key-formatting.rs)\n74. [Max Consecutive Ones](https://github.com/liby/leetcode/blob/main/solutions/485.max-consecutive-ones.rs)\n75. [Construct the Rectangle](https://github.com/liby/leetcode/blob/main/solutions/492.construct-the-rectangle.rs)\n76. [Teemo Attacking](https://github.com/liby/leetcode/blob/main/solutions/495.teemo-attacking.rs)\n77. [Next Greater Element I](https://github.com/liby/leetcode/blob/main/solutions/496.next-greater-element-i.rs)\n78. [Keyboard Row](https://github.com/liby/leetcode/blob/main/solutions/500.keyboard-row.rs)\n79. [Find Mode in Binary Search Tree](https://github.com/liby/leetcode/blob/main/solutions/501.find-mode-in-binary-search-tree.rs)\n80. [Base 7](https://github.com/liby/leetcode/blob/main/solutions/504.base-7.rs)\n81. [Perfect Number](https://github.com/liby/leetcode/blob/main/solutions/507.perfect-number.rs)\n82. [Most Frequent Subtree Sum](https://github.com/liby/leetcode/blob/main/solutions/508.most-frequent-subtree-sum.rs)\n83. [Fibonacci Number](https://github.com/liby/leetcode/blob/main/solutions/509.fibonacci-number.rs)\n84. [Detect Capital](https://github.com/liby/leetcode/blob/main/solutions/520.detect-capital.rs)\n85. [Longest Uncommon Subsequence I](https://github.com/liby/leetcode/blob/main/solutions/521.longest-uncommon-subsequence-i.rs)\n86. [Reverse String II](https://github.com/liby/leetcode/blob/main/solutions/541.reverse-string-ii.rs)\n87. [Student Attendance Record I](https://github.com/liby/leetcode/blob/main/solutions/551.student-attendance-record-i.rs)\n88. [Reverse Words in a String III](https://github.com/liby/leetcode/blob/main/solutions/557.reverse-words-in-a-string-iii.rs)\n89. [Array Partition I](https://github.com/liby/leetcode/blob/main/solutions/561.array-partition-i.rs)\n90. [Binary Tree Tilt](https://github.com/liby/leetcode/blob/main/solutions/563.binary-tree-tilt.rs)\n91. [Reshape the Matrix](https://github.com/liby/leetcode/blob/main/solutions/566.reshape-the-matrix.rs)\n92. [Distribute Candies](https://github.com/liby/leetcode/blob/main/solutions/575.distribute-candies.rs)\n93. [Longest Harmonious Subsequence](https://github.com/liby/leetcode/blob/main/solutions/594.longest-harmonious-subsequence.rs)\n94. [Range Addition II](https://github.com/liby/leetcode/blob/main/solutions/598.range-addition-ii.rs)\n95. [Can Place Flowers](https://github.com/liby/leetcode/blob/main/solutions/605.can-place-flowers.rs)\n96. [Merge Two Binary Trees](https://github.com/liby/leetcode/blob/main/solutions/617.merge-two-binary-trees.rs)\n97. [Maximum Product of Three Numbers](https://github.com/liby/leetcode/blob/main/solutions/628.maximum-product-of-three-numbers.rs)\n98. [Maximum Average Subarray I](https://github.com/liby/leetcode/blob/main/solutions/643.maximum-average-subarray-i.rs)\n99. [Two Sum IV - Input is a BST](https://github.com/liby/leetcode/blob/main/solutions/653.two-sum-iv-input-is-a-bst.rs)\n100. [Longest Continuous Increasing Subsequence](https://github.com/liby/leetcode/blob/main/solutions/674.longest-continuous-increasing-subsequence.rs)\n101. [Valid Palindrome II](https://github.com/liby/leetcode/blob/main/solutions/680.valid-palindrome-ii.rs)\n102. [Baseball Game](https://github.com/liby/leetcode/blob/main/solutions/682.baseball-game.rs)\n103. [Binary Number with Alternating Bits](https://github.com/liby/leetcode/blob/main/solutions/693.binary-number-with-alternating-bits.rs)\n104. [Count Binary Substrings](https://github.com/liby/leetcode/blob/main/solutions/696.count-binary-substrings.rs)\n105. [Degree of an Array](https://github.com/liby/leetcode/blob/main/solutions/697.degree-of-an-array.rs)\n106. [Search in a Binary Search Tree](https://github.com/liby/leetcode/blob/main/solutions/700.search-in-a-binary-search-tree.rs)\n107. [Binary Search](https://github.com/liby/leetcode/blob/main/solutions/704.binary-search.rs)\n108. [Design HashSet](https://github.com/liby/leetcode/blob/main/solutions/705.design-hash-set.rs)\n109. [Design HashMap](https://github.com/liby/leetcode/blob/main/solutions/706.design-hash-map.rs)\n110. [To Lower Case](https://github.com/liby/leetcode/blob/main/solutions/709.to-lower-case.rs)\n111. [1-bit and 2-bit Characters](https://github.com/liby/leetcode/blob/main/solutions/717.1-bit-and-2-bit-characters.rs)\n112. [Find Pivot Index](https://github.com/liby/leetcode/blob/main/solutions/724.find-pivot-index.rs)\n113. [Flood Fill](https://github.com/liby/leetcode/blob/main/solutions/733.flood-fill.rs)\n114. [Find Smallest Letter Greater Than Target](https://github.com/liby/leetcode/blob/main/solutions/744.find-smallest-letter-greater-than-target.rs)\n115. [Min Cost Climbing Stairs](https://github.com/liby/leetcode/blob/main/solutions/746.min-cost-climbing-stairs.rs)\n116. [Largest Number At Least Twice of Others](https://github.com/liby/leetcode/blob/main/solutions/747.largest-number-at-least-twice-of-others.rs)\n117. [Shortest Completing Word](https://github.com/liby/leetcode/blob/main/solutions/748.shortest-completing-word.rs)\n118. [Prime Number of Set Bits in Binary Representation](https://github.com/liby/leetcode/blob/main/solutions/762.prime-number-of-set-bits-in-binary-representation.rs)\n119. [Toeplitz Matrix](https://github.com/liby/leetcode/blob/main/solutions/766.toeplitz-matrix.rs)\n120. [Jewels and Stones](https://github.com/liby/leetcode/blob/main/solutions/771.jewels-and-stones.rs)\n121. [Rotate String](https://github.com/liby/leetcode/blob/main/solutions/796.rotate-string.rs)\n122. [Unique Morse Code Words](https://github.com/liby/leetcode/blob/main/solutions/804.unique-morse-code-words.rs)\n123. [Number of Lines To Write String](https://github.com/liby/leetcode/blob/main/solutions/806.number-of-lines-to-write-string.rs)\n124. [Most Common Word](https://github.com/liby/leetcode/blob/main/solutions/819.most-common-word.rs)\n125. [Shortest Distance to a Character](https://github.com/liby/leetcode/blob/main/solutions/821.shortest-distance-to-a-character.rs)\n126. [Goat Latin](https://github.com/liby/leetcode/blob/main/solutions/824.goat-latin.rs)\n127. [Positions of Large Groups](https://github.com/liby/leetcode/blob/main/solutions/830.positions-of-large-groups.rs)\n128. [Flipping an Image](https://github.com/liby/leetcode/blob/main/solutions/832.flipping-an-image.rs)\n129. [Rectangle Overlap](https://github.com/liby/leetcode/blob/main/solutions/836.rectangle-overlap.rs)\n130. [Peak Index in a Mountain Array](https://github.com/liby/leetcode/blob/main/solutions/852.peak-index-in-a-mountain-array.rs)\n131. [Buddy Strings](https://github.com/liby/leetcode/blob/main/solutions/859.buddy-strings.rs)\n132. [Lemonade Change](https://github.com/liby/leetcode/blob/main/solutions/860.lemonade-change.rs)\n133. [Binary Gap](https://github.com/liby/leetcode/blob/main/solutions/868.binary-gap.rs)\n134. [Leaf-Similar Trees](https://github.com/liby/leetcode/blob/main/solutions/872.leaf-similar-trees.rs)\n135. [Middle of the Linked List](https://github.com/liby/leetcode/blob/main/solutions/876.middle-of-the-linked-list.rs)\n136. [Projection Area of 3D Shapes](https://github.com/liby/leetcode/blob/main/solutions/883.projection-area-of-3-d-shapes.rs)\n137. [Uncommon Words from Two Sentences](https://github.com/liby/leetcode/blob/main/solutions/884.uncommon-words-from-two-sentences.rs)\n138. [Fair Candy Swap](https://github.com/liby/leetcode/blob/main/solutions/888.fair-candy-swap.rs)\n139. [Surface Area of 3D Shapes](https://github.com/liby/leetcode/blob/main/solutions/892.surface-area-of-3-d-shapes.rs)\n140. [Monotonic Array](https://github.com/liby/leetcode/blob/main/solutions/896.monotonic-array.rs)\n\n## Thanks\n\nSpecial thanks to [JetBrains](https://jb.gg/OpenSourceSupport) for providing the license certificate to the project.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliby%2Fleetcode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fliby%2Fleetcode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliby%2Fleetcode/lists"}