{"id":21011345,"url":"https://github.com/parzivaleugene/leetcode","last_synced_at":"2025-12-28T12:31:52.991Z","repository":{"id":247080928,"uuid":"822616242","full_name":"ParzivalEugene/leetcode","owner":"ParzivalEugene","description":"Solutions for leetcode problems","archived":false,"fork":false,"pushed_at":"2025-01-04T21:32:04.000Z","size":164,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-20T11:22:33.994Z","etag":null,"topics":["leetcode","rust"],"latest_commit_sha":null,"homepage":"https://leetcode.com/u/ParzivalEugene/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ParzivalEugene.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-01T13:28:44.000Z","updated_at":"2025-01-04T21:32:07.000Z","dependencies_parsed_at":"2024-07-09T21:58:05.543Z","dependency_job_id":"e5903f2f-f667-4d7b-85d9-8da9eee4f57e","html_url":"https://github.com/ParzivalEugene/leetcode","commit_stats":null,"previous_names":["parzivaleugene/leetcode"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ParzivalEugene%2Fleetcode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ParzivalEugene%2Fleetcode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ParzivalEugene%2Fleetcode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ParzivalEugene%2Fleetcode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ParzivalEugene","download_url":"https://codeload.github.com/ParzivalEugene/leetcode/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243438003,"owners_count":20290863,"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":["leetcode","rust"],"created_at":"2024-11-19T09:27:44.387Z","updated_at":"2025-12-28T12:31:52.953Z","avatar_url":"https://github.com/ParzivalEugene.png","language":"Rust","readme":"# Solutions for leetcode problems\n\n\u003ca align=center href=https://brainmade.org//\u003e\n    \u003cimg src=\"https://brainmade.org/white-logo.svg\"\u003e\n\u003c/a\u003e\n\n## Pre-commit\n\n\u003e build pre-commit cargo before !\n\n```bash\n#!/bin/bash\ncd pre-commit\n./target/release/pre-commit\ncd -\ngit add README.md\n\ncd rust\ncargo fmt\nIFS=$'\\n'\nfor line in $(git status -s)\n    do\n        if [[ $line == A* || $line == M* ]]\n        then\n            if [[ $line == *.rs ]]\n            then\n                git add $(pwd)/${line:3}\n            fi\n        fi\n    done\ncd -\n```\n\n### Problems\n\u003c!-- counters start --\u003e\n![all](https://img.shields.io/badge/solved-121-blue?style=for-the-badge) ![python](https://img.shields.io/badge/python-7-3776AB?logo=python\u0026style=for-the-badge) ![rust](https://img.shields.io/badge/rust-105-000000?logo=rust\u0026style=for-the-badge) ![sql](https://img.shields.io/badge/sql-12-4479A1?logo=mysql\u0026style=for-the-badge)\n\u003c!-- counters end --\u003e\n\u003c!-- table start --\u003e\n| Problem | Solution | Difficulty |\n|---|---|---|\n| 1. [Two Sum](https://lcid.cc/1) | [rust](rust/src/solutions/p0001.rs) | Easy |\n| 4. [Median of Two Sorted Arrays](https://lcid.cc/4) | [rust](rust/src/solutions/p0004.rs) | Hard |\n| 6. [Zigzag Conversion](https://lcid.cc/6) | [rust](rust/src/solutions/p0006.rs) | Medium |\n| 9. [Palindrome Number](https://lcid.cc/9) | [rust](rust/src/solutions/p0009.rs) | Easy |\n| 11. [Container With Most Water](https://lcid.cc/11) | [rust](rust/src/solutions/p0011.rs) | Medium |\n| 13. [Roman to Integer](https://lcid.cc/13) | [rust](rust/src/solutions/p0013.rs) | Easy |\n| 14. [Longest Common Prefix](https://lcid.cc/14) | [rust](rust/src/solutions/p0014.rs), [python](python/solutions/p0014.py) | Easy |\n| 17. [Letter Combinations of a Phone Number](https://lcid.cc/17) | [rust](rust/src/solutions/p0017.rs) | Medium |\n| 20. [Valid Parentheses](https://lcid.cc/20) | [rust](rust/src/solutions/p0020.rs) | Easy |\n| 21. [Merge Two Sorted Lists](https://lcid.cc/21) | [rust](rust/src/solutions/p0021.rs) | Easy |\n| 26. [Remove Duplicates from Sorted Array](https://lcid.cc/26) | [rust](rust/src/solutions/p0026.rs) | Easy |\n| 27. [Remove Element](https://lcid.cc/27) | [rust](rust/src/solutions/p0027.rs) | Easy |\n| 28. [Find the Index of the First Occurrence in a String](https://lcid.cc/28) | [rust](rust/src/solutions/p0028.rs) | Easy |\n| 33. [Search in Rotated Sorted Array](https://lcid.cc/33) | [rust](rust/src/solutions/p0033.rs) | Medium |\n| 34. [Find First and Last Position of Element in Sorted Array](https://lcid.cc/34) | [rust](rust/src/solutions/p0034.rs) | Medium |\n| 36. [Valid Sudoku](https://lcid.cc/36) | [rust](rust/src/solutions/p0036.rs) | Medium |\n| 38. [Count and Say](https://lcid.cc/38) | [rust](rust/src/solutions/p0038.rs) | Medium |\n| 43. [Multiply Strings](https://lcid.cc/43) | [rust](rust/src/solutions/p0043.rs) | Medium |\n| 45. [Jump Game II](https://lcid.cc/45) | [rust](rust/src/solutions/p0045.rs) | Medium |\n| 48. [Rotate Image](https://lcid.cc/48) | [rust](rust/src/solutions/p0048.rs) | Medium |\n| 49. [Group Anagrams](https://lcid.cc/49) | [rust](rust/src/solutions/p0049.rs) | Medium |\n| 54. [Spiral Matrix](https://lcid.cc/54) | [rust](rust/src/solutions/p0054.rs) | Medium |\n| 55. [Jump Game](https://lcid.cc/55) | [rust](rust/src/solutions/p0055.rs) | Medium |\n| 56. [Merge Intervals](https://lcid.cc/56) | [rust](rust/src/solutions/p0056.rs) | Medium |\n| 58. [Length of Last Word](https://lcid.cc/58) | [rust](rust/src/solutions/p0058.rs) | Easy |\n| 59. [Spiral Matrix II](https://lcid.cc/59) | [rust](rust/src/solutions/p0059.rs) | Medium |\n| 66. [Plus One](https://lcid.cc/66) | [rust](rust/src/solutions/p0066.rs) | Easy |\n| 70. [Climbing Stairs](https://lcid.cc/70) | [rust](rust/src/solutions/p0070.rs) | Easy |\n| 71. [Simplify Path](https://lcid.cc/71) | [rust](rust/src/solutions/p0071.rs) | Medium |\n| 80. [Remove Duplicates from Sorted Array II](https://lcid.cc/80) | [rust](rust/src/solutions/p0080.rs) | Medium |\n| 88. [Merge Sorted Array](https://lcid.cc/88) | [rust](rust/src/solutions/p0088.rs) | Easy |\n| 100. [Same Tree](https://lcid.cc/100) | [rust](rust/src/solutions/p0100.rs) | Easy |\n| 104. [Maximum Depth of Binary Tree](https://lcid.cc/104) | [rust](rust/src/solutions/p0104.rs) | Easy |\n| 121. [Best Time to Buy and Sell Stock](https://lcid.cc/121) | [rust](rust/src/solutions/p0121.rs) | Easy |\n| 122. [Best Time to Buy and Sell Stock II](https://lcid.cc/122) | [rust](rust/src/solutions/p0122.rs) | Medium |\n| 125. [Valid Palindrome](https://lcid.cc/125) | [rust](rust/src/solutions/p0125.rs) | Easy |\n| 136. [Single Number](https://lcid.cc/136) | [rust](rust/src/solutions/p0136.rs) | Easy |\n| 151. [Reverse Words in a String](https://lcid.cc/151) | [rust](rust/src/solutions/p0151.rs) | Medium |\n| 167. [Two Sum II - Input Array Is Sorted](https://lcid.cc/167) | [rust](rust/src/solutions/p0167.rs) | Medium |\n| 169. [Majority Element](https://lcid.cc/169) | [rust](rust/src/solutions/p0169.rs) | Easy |\n| 172. [Factorial Trailing Zeroes](https://lcid.cc/172) | [rust](rust/src/solutions/p0172.rs) | Medium |\n| 189. [Rotate Array](https://lcid.cc/189) | [rust](rust/src/solutions/p0189.rs) | Medium |\n| 197. [Rising Temperature](https://lcid.cc/197) | [sql](sql/solutions/p0197.sql) | Easy |\n| 198. [House Robber](https://lcid.cc/198) | [rust](rust/src/solutions/p0198.rs) | Medium |\n| 202. [Happy Number](https://lcid.cc/202) | [rust](rust/src/solutions/p0202.rs) | Easy |\n| 203. [Remove Linked List Elements](https://lcid.cc/203) | [rust](rust/src/solutions/p0203.rs) | Easy |\n| 205. [Isomorphic Strings](https://lcid.cc/205) | [rust](rust/src/solutions/p0205.rs) | Easy |\n| 215. [Kth Largest Element in an Array](https://lcid.cc/215) | [rust](rust/src/solutions/p0215.rs) | Medium |\n| 217. [Contains Duplicate](https://lcid.cc/217) | [rust](rust/src/solutions/p0217.rs) | Easy |\n| 219. [Contains Duplicate II](https://lcid.cc/219) | [rust](rust/src/solutions/p0219.rs) | Easy |\n| 226. [Invert Binary Tree](https://lcid.cc/226) | [rust](rust/src/solutions/p0226.rs) | Easy |\n| 228. [Summary Ranges](https://lcid.cc/228) | [rust](rust/src/solutions/p0228.rs), [python](python/solutions/p0228.py) | Easy |\n| 238. [Product of Array Except Self](https://lcid.cc/238) | [python](python/solutions/p0238.py) | Medium |\n| 242. [Valid Anagram](https://lcid.cc/242) | [rust](rust/src/solutions/p0242.rs) | Easy |\n| 274. [H-Index](https://lcid.cc/274) | [rust](rust/src/solutions/p0274.rs) | Medium |\n| 290. [Word Pattern](https://lcid.cc/290) | [rust](rust/src/solutions/p0290.rs) | Easy |\n| 328. [Odd Even Linked List](https://lcid.cc/328) | [rust](rust/src/solutions/p0328.rs) | Medium |\n| 334. [Increasing Triplet Subsequence](https://lcid.cc/334) | [rust](rust/src/solutions/p0334.rs) | Medium |\n| 338. [Counting Bits](https://lcid.cc/338) | [rust](rust/src/solutions/p0338.rs) | Easy |\n| 383. [Ransom Note](https://lcid.cc/383) | [rust](rust/src/solutions/p0383.rs) | Easy |\n| 392. [Is Subsequence](https://lcid.cc/392) | [rust](rust/src/solutions/p0392.rs), [python](python/solutions/p0392.py) | Easy |\n| 394. [Decode String](https://lcid.cc/394) | [rust](rust/src/solutions/p0394.rs) | Medium |\n| 443. [String Compression](https://lcid.cc/443) | [rust](rust/src/solutions/p0443.rs) | Medium |\n| 485. [Max Consecutive Ones](https://lcid.cc/485) | [rust](rust/src/solutions/p0485.rs) | Easy |\n| 535. [Encode and Decode TinyURL](https://lcid.cc/535) | [rust](rust/src/solutions/p0535.rs) | Medium |\n| 577. [Employee Bonus](https://lcid.cc/577) | [sql](sql/solutions/p0577.sql) | Easy |\n| 584. [Find Customer Referee](https://lcid.cc/584) | [sql](sql/solutions/p0584.sql) | Easy |\n| 595. [Big Countries](https://lcid.cc/595) | [sql](sql/solutions/p0595.sql) | Easy |\n| 649. [Dota2 Senate](https://lcid.cc/649) | [rust](rust/src/solutions/p0649.rs) | Medium |\n| 700. [Search in a Binary Search Tree](https://lcid.cc/700) | [rust](rust/src/solutions/p0700.rs) | Easy |\n| 724. [Find Pivot Index](https://lcid.cc/724) | [rust](rust/src/solutions/p0724.rs) | Easy |\n| 735. [Asteroid Collision](https://lcid.cc/735) | [rust](rust/src/solutions/p0735.rs) | Medium |\n| 746. [Min Cost Climbing Stairs](https://lcid.cc/746) | [rust](rust/src/solutions/p0746.rs) | Easy |\n| 771. [Jewels and Stones](https://lcid.cc/771) | [rust](rust/src/solutions/p0771.rs) | Easy |\n| 840. [Magic Squares In Grid](https://lcid.cc/840) | [rust](rust/src/solutions/p0840.rs) | Medium |\n| 872. [Leaf-Similar Trees](https://lcid.cc/872) | [rust](rust/src/solutions/p0872.rs) | Easy |\n| 912. [Sort an Array](https://lcid.cc/912) | [rust](rust/src/solutions/p0912.rs) | Medium |\n| 1004. [Max Consecutive Ones III](https://lcid.cc/1004) | [rust](rust/src/solutions/p1004.rs) | Medium |\n| 1038. [Binary Search Tree to Greater Sum Tree](https://lcid.cc/1038) | [python](python/solutions/p1038.py) | Medium |\n| 1068. [Product Sales Analysis I](https://lcid.cc/1068) | [sql](sql/solutions/p1068.sql) | Easy |\n| 1071. [Greatest Common Divisor of Strings](https://lcid.cc/1071) | [rust](rust/src/solutions/p1071.rs) | Easy |\n| 1137. [N-th Tribonacci Number](https://lcid.cc/1137) | [rust](rust/src/solutions/p1137.rs) | Easy |\n| 1148. [Article Views I](https://lcid.cc/1148) | [sql](sql/solutions/p1148.sql) | Easy |\n| 1280. [Students and Examinations](https://lcid.cc/1280) | [sql](sql/solutions/p1280.sql) | Easy |\n| 1282. [Group the People Given the Group Size They Belong To](https://lcid.cc/1282) | [rust](rust/src/solutions/p1282.rs) | Medium |\n| 1365. [How Many Numbers Are Smaller Than the Current Number](https://lcid.cc/1365) | [rust](rust/src/solutions/p1365.rs) | Easy |\n| 1378. [Replace Employee ID With The Unique Identifier](https://lcid.cc/1378) | [sql](sql/solutions/p1378.sql) | Easy |\n| 1395. [Count Number of Teams](https://lcid.cc/1395) | [rust](rust/src/solutions/p1395.rs) | Medium |\n| 1442. [Count Triplets That Can Form Two Arrays of Equal XOR](https://lcid.cc/1442) | [rust](rust/src/solutions/p1442.rs) | Medium |\n| 1448. [Count Good Nodes in Binary Tree](https://lcid.cc/1448) | [rust](rust/src/solutions/p1448.rs) | Medium |\n| 1456. [Maximum Number of Vowels in a Substring of Given Length](https://lcid.cc/1456) | [rust](rust/src/solutions/p1456.rs) | Medium |\n| 1460. [Make Two Arrays Equal by Reversing Subarrays](https://lcid.cc/1460) | [rust](rust/src/solutions/p1460.rs) | Easy |\n| 1493. [Longest Subarray of 1's After Deleting One Element](https://lcid.cc/1493) | [rust](rust/src/solutions/p1493.rs) | Medium |\n| 1508. [Range Sum of Sorted Subarray Sums](https://lcid.cc/1508) | [rust](rust/src/solutions/p1508.rs) | Medium |\n| 1512. [Number of Good Pairs](https://lcid.cc/1512) | [rust](rust/src/solutions/p1512.rs) | Easy |\n| 1550. [Three Consecutive Odds](https://lcid.cc/1550) | [rust](rust/src/solutions/p1550.rs) | Easy |\n| 1581. [Customer Who Visited but Did Not Make Any Transactions](https://lcid.cc/1581) | [sql](sql/solutions/p1581.sql) | Easy |\n| 1630. [Arithmetic Subarrays](https://lcid.cc/1630) | [rust](rust/src/solutions/p1630.rs) | Medium |\n| 1636. [Sort Array by Increasing Frequency](https://lcid.cc/1636) | [rust](rust/src/solutions/p1636.rs) | Easy |\n| 1657. [Determine if Two Strings Are Close](https://lcid.cc/1657) | [rust](rust/src/solutions/p1657.rs) | Medium |\n| 1661. [Average Time of Process per Machine](https://lcid.cc/1661) | [sql](sql/solutions/p1661.sql) | Easy |\n| 1679. [Max Number of K-Sum Pairs](https://lcid.cc/1679) | [rust](rust/src/solutions/p1679.rs) | Medium |\n| 1683. [Invalid Tweets](https://lcid.cc/1683) | [sql](sql/solutions/p1683.sql) | Easy |\n| 1689. [Partitioning Into Minimum Number Of Deci-Binary Numbers](https://lcid.cc/1689) | [rust](rust/src/solutions/p1689.rs) | Medium |\n| 1757. [Recyclable and Low Fat Products](https://lcid.cc/1757) | [sql](sql/solutions/p1757.sql) | Easy |\n| 1768. [Merge Strings Alternately](https://lcid.cc/1768) | [python](python/solutions/p1768.py) | Easy |\n| 2095. [Delete the Middle Node of a Linked List](https://lcid.cc/2095) | [rust](rust/src/solutions/p2095.rs) | Medium |\n| 2130. [Maximum Twin Sum of a Linked List](https://lcid.cc/2130) | [rust](rust/src/solutions/p2130.rs) | Medium |\n| 2181. [Merge Nodes in Between Zeros](https://lcid.cc/2181) | [rust](rust/src/solutions/p2181.rs) | Medium |\n| 2239. [Find Closest Number to Zero](https://lcid.cc/2239) | [python](python/solutions/p2239.py) | Easy |\n| 2352. [Equal Row and Column Pairs](https://lcid.cc/2352) | [rust](rust/src/solutions/p2352.rs) | Medium |\n| 2390. [Removing Stars From a String](https://lcid.cc/2390) | [rust](rust/src/solutions/p2390.rs) | Medium |\n| 2418. [Sort the People](https://lcid.cc/2418) | [rust](rust/src/solutions/p2418.rs) | Easy |\n| 2610. [Convert an Array Into a 2D Array With Conditions](https://lcid.cc/2610) | [rust](rust/src/solutions/p2610.rs) | Medium |\n| 2678. [Number of Senior Citizens](https://lcid.cc/2678) | [rust](rust/src/solutions/p2678.rs) | Easy |\n| 2769. [Find the Maximum Achievable Number](https://lcid.cc/2769) | [rust](rust/src/solutions/p2769.rs) | Easy |\n| 2807. [Insert Greatest Common Divisors in Linked List](https://lcid.cc/2807) | [rust](rust/src/solutions/p2807.rs) | Medium |\n| 3110. [Score of a String](https://lcid.cc/3110) | [rust](rust/src/solutions/p3110.rs) | Easy |\n| 3146. [Permutation Difference between Two Strings](https://lcid.cc/3146) | [rust](rust/src/solutions/p3146.rs) | Easy |\n| 3206. [Alternating Groups I](https://lcid.cc/3206) | [rust](rust/src/solutions/p3206.rs) | Easy |\n| 3208. [Alternating Groups II](https://lcid.cc/3208) | [rust](rust/src/solutions/p3208.rs) | Medium |\n\u003c!-- table end --\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparzivaleugene%2Fleetcode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparzivaleugene%2Fleetcode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparzivaleugene%2Fleetcode/lists"}