{"id":16759087,"url":"https://github.com/jack0pan/leetcode","last_synced_at":"2025-07-21T12:40:46.750Z","repository":{"id":98690915,"uuid":"122564095","full_name":"jack0pan/leetcode","owner":"jack0pan","description":"LeetCode Problems' Solutions","archived":false,"fork":false,"pushed_at":"2018-10-21T04:24:10.000Z","size":116,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-16T08:28:20.919Z","etag":null,"topics":["leetcode","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jack0pan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2018-02-23T02:39:29.000Z","updated_at":"2018-10-21T04:24:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"ffe0e0b1-55f0-48f3-bad0-31da5c3541af","html_url":"https://github.com/jack0pan/leetcode","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jack0pan/leetcode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jack0pan%2Fleetcode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jack0pan%2Fleetcode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jack0pan%2Fleetcode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jack0pan%2Fleetcode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jack0pan","download_url":"https://codeload.github.com/jack0pan/leetcode/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jack0pan%2Fleetcode/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266303703,"owners_count":23908375,"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","status":"online","status_checked_at":"2025-07-21T11:47:31.412Z","response_time":64,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","ruby"],"created_at":"2024-10-13T04:07:17.269Z","updated_at":"2025-07-21T12:40:46.725Z","avatar_url":"https://github.com/jack0pan.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LeetCode \n## Algorithms\n\n| # | Title | Solution | Difficulty |\n|---| ----- | -------- | ---------- |\n|1|[Two Sum](https://leetcode.com/problems/two-sum/description/)|[README](./algorithms/two_sum)|Easy|\n|2|[Add Two Numbers](https://leetcode.com/problems/add-two-numbers/description/)|[README](./algorithms/add_two_numbers)|Medium|\n|3|[Longest Substring Without Repeating Characters](https://leetcode.com/problems/longest-substring-without-repeating-characters/description/)|[README](./algorithms/longest_substring_without_repeating_characters)|Medium|\n|5|[Longest Palindromic Substring](https://leetcode.com/problems/longest-palindromic-substring/description/)|[README](./algorithms/longest_palindromic_substring)|Medium|\n|6|[ZigZag Conversion](https://leetcode.com/problems/zigzag-conversion/description/)|[README](./algorithms/zigzag_conversion)|Medium|\n|7|[Reverse Integer](https://leetcode.com/problems/reverse-integer/description/)|[README](./algorithms/reverse_integer)|Easy|\n|8|[String to Integer (atoi)](https://leetcode.com/problems/string-to-integer-atoi/description/)|[README](./algorithms/string_to_integer_atoi)|Medium|\n|9|[Palindrome Number](https://leetcode.com/problems/palindrome-number/description/)|[README](./algorithms/palindrome_number)|Easy|\n|11|[Container With Most Water](https://leetcode.com/problems/container-with-most-water/description/)|[README](./algorithms/container_with_most_water)|Medium|\n|12|[Integer to Roman](https://leetcode.com/problems/integer-to-roman/description/)|[README](./algorithms/integer_to_roman)|Medium|\n|13|[Roman to Integer](https://leetcode.com/problems/roman-to-integer/description/)|[README](./algorithms/roman_to_integer)|Easy|\n|14|[Longest Common Prefix](https://leetcode.com/problems/longest-common-prefix/description/)|[README](./algorithms/longest_common_prefix)|Easy|\n|15|[3Sum](https://leetcode.com/problems/3sum/description/)|[README](./algorithms/three_sum)|Medium|\n|16|[3Sum Closest](https://leetcode.com/problems/3sum-closest/description/)|[README](./algorithms/three_sum_closest)|Medium|\n|17|[Letter Combinations of a Phone Number](https://leetcode.com/problems/letter-combinations-of-a-phone-number/description/)|[README](./algorithms/letter_combinations_of_a_phone_number)|Medium|\n|18|[4Sum](https://leetcode.com/problems/4sum/description/)|[README](./algorithms/four_sum)|Medium|\n|19|[Remove Nth Node From End of List](https://leetcode.com/problems/remove-nth-node-from-end-of-list/description/)|[README](./algorithms/remove_nth_from_end_of_list)|Medium|\n|20|[Valid Parentheses](https://leetcode.com/problems/valid-parentheses/description/)|[README](./algorithms/valid_parentheses)|Easy|\n|21|[Merge Two Sorted Lists](https://leetcode.com/problems/merge-two-sorted-lists/description/)|[README](./algorithms/merge_two_sorted_lists)|Easy|\n|22|[Generate Parentheses](https://leetcode.com/problems/generate-parentheses/description/)|[README](./algorithms/generate_parentheses)|Medium|\n|24|[Swap Nodes in Pairs](https://leetcode.com/problems/swap-nodes-in-pairs/description/)|[README](./algorithms/swap_nodes_in_pairs)|Medium|\n|26|[Remove Duplicates from Sorted Array](https://leetcode.com/problems/remove-duplicates-from-sorted-array/description/)|[README](./algorithms/remove_duplicates_from_sorted_array)|Easy|\n|27|[Remove Element](https://leetcode.com/problems/remove-element/description/)|[README](./algorithms/remove_element)|Easy|\n|28|[Implement strStr()](https://leetcode.com/problems/impelement-strstr/description/)|[README](./algorithms/implement_strstr)|Easy|\n|29|[Divide Two Integers](https://leetcode.com/problems/divide-tow-integers/description/)|[README](./algorithms/divide_two_integers)|Medium|\n|31|[Next Permutation](https://leetcode.com/problems/next-permutation/description/)|[README](./algorithms/next_permutation)|Medium|\n|33|[Search in Rotated Sorted Array](https://leetcode.com/problems/search-in-rotated-sorted-array/description/)|[README](./algorithms/search_in_rotated_sorted_array)|Medium|\n|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/description/)|[README](./algorithms/find_first_and_last_position_of_element_in_sorted_array)|Medium|\n|35|[Search Insert Postion](https://leetcode.com/problems/search-insert-position/description/)|[README](./algorithms/search_insert_position)|Easy|\n|36|[Valid Sudoku](https://leetcode.com/problems/valid-sudoku/description/)|[README](./algorithms/valid_sudoku)|Medium|\n|38|[Count and Say](https://leetcode.com/problems/count-and-say/description/)|[README](./algorithms/count_and_say)|Easy|\n|39|[Combination Sum](https://leetcode.com/problems/combination-sum/description/)|[README](./algorithms/combination_sum)|Medium|\n|40|[Combination Sum II](https://leetcode.com/problems/combination-sum-ii/description/)|[README](./algorithms/combination_sum_ii)|Medium|\n|43|[Multiply Strings](https://leetcode.com/problems/multiply-strings/description/)|[README](./algorithms/multiply_strings)|Medium|\n|46|[Permutations](https://leetcode.com/problems/permutations/description/)|[README](./algorithms/permutations)|Medium|\n|47|[Permutations II](https://leetcode.com/problems/permutations-ii/description/)|[README](./algorithms/permutations_ii)|Medium|\n|48|[Rotate Image](https://leetcode.com/problems/rotate-image/description/)|[README](./algorithms/rotate_image)|Medium|\n|49|[Group Anagrams](https://leetcode.com/problems/group-anagrams/description/)|[README](./algorithms/group_anagrams)|Medium|\n|50|[Pow(x, n)](https://leetcode.com/problems/powx-n/description/)|[README](./algorithms/powx_n)|Medium|\n|53|[Maximum Subarray](https://leetcode.com/problems/maximum-subarray/description/)|[README](./algorithms/maximum_subarray)|Easy|\n|54|[Spiral Matrix](https://leetcode.com/problems/spiral-matrix/description/)|[README](./algorithms/spiral_matrix)|Medium|\n|55|[Jump Game](https://leetcode.com/problems/jump-game/description/)|[README](./algorithms/jump_game)|Medium|\n|56|[Merge Intervals](https://leetcode.com/problems/merge-intervals/description/)|[README](./algorithms/merge_intervals)|Medium|\n|58|[Length of Last Word](https://leetcode.com/problems/length-of-last-word/description/)|[README](./algorithms/length_of_last_word)|Easy|\n|59|[Spiral Matrix II](https://leetcode.com/problems/spiral-matrix-ii/description/)|[README](./algorithms/spiral_matrix_ii)|Medium|\n|60|[Permutation Sequence](https://leetcode.com/problems/permutation-sequence/description/)|[README](./algorithms/permutation_sequence)|Medium|\n|61|[Rotate List](https://leetcode.com/problems/rotate-list/description/)|[README](./algorithms/rotate_list)|Medium|\n|62|[Unique Paths](https://leetcode.com/problems/unique-paths/description/)|[README](./algorithms/unique_paths)|Medium|\n|63|[Unique Paths II](https://leetcode.com/problems/unique-paths-ii/description/)|[README](./algorithms/unique_paths_ii)|Medium|\n|64|[Minimum Path Sum](https://leetcode.com/problems/minimum-path-sum/description/)|[README](./algorithms/minimum_path_sum)|Medium|\n|66|[Plus One](https://leetcode.com/problems/plus-one/description/)|[README](./algorithms/plus_one)|Easy|\n|67|[Add Binary](https://leetcode.com/problems/add-binary/description/)|[README](./algorithms/add_binary)|Easy|\n|69|[Sqrt(x)](https://leetcode.com/problems/sqrtx/description/)|[README](./algorithms/sqrtx)|Easy|\n|70|[Climbing Stairs](https://leetcode.com/problems/climbing-stairs/description/)|[README](./algorithms/climbing_stairs)|Easy|\n|71|[Simplify Path](https://leetcode.com/problems/simplify-path/description/)|[README](./algorithms/simplify_path)|Medium|\n|73|[Set Matrix Zeroes](https://leetcode.com/problems/set-matrix-zeroes/description/)|[README](./algorithms/set_matrix_zeroes)|Medium|\n|74|[Search a 2D Matrix](https://leetcode.com/problems/search-a-2d-matrix/description/)|[README](./algorithms/search_a_2d_matrix)|Medium|\n|75|[Sort Colors](https://leetcode.com/problems/sort-colors/description/)|[README](./algorithms/sort_colors)|Medium|\n|77|[Combinations](https://leetcode.com/problems/combinations/description/)|[README](./algorithms/combinations)|Medium|\n|78|[Subsets](https://leetcode.com/problems/subsets/description/)|[README](./algorithms/subsets)|Medium|\n|79|[Word Search](https://leetcode.com/problems/word-search/description/)|[README](./algorithms/word_search)|Medium|\n|80|[Remove Duplicates from Sorted Array II](https://leetcode.com/problems/remove-duplicates-from-sorted-array-ii/description/)|[README](./algorithms/remove_duplicates_from_sorted_array_ii)|Medium|\n|81|[Search in Rotated Sorted Array II](https://leetcode.com/problems/search-in-rotated-sorted-array-ii/description/)|[README](./algorithms/search_in_rotated_sorted_array_ii)|Medium|\n|82|[Remove Duplicates from Sorted List II](https://leetcode.com/problems/remove-duplicates-from-sorted-list-ii/description/)|[README](./algorithms/remove_duplicates_from_sorted_list_ii)|Medium|\n|83|[Remove Duplicates from Sorted List](https://leetcode.com/problems/remove-duplicates-from-sorted-list/description/)|[README](./algorithms/remove_duplicates_from_sorted_list)|Easy|\n|86|[Partition List](https://leetcode.com/problems/partition-list/description/)|[README](./algorithms/partition_list)|Medium|\n|88|[Merge Sorted Array](https://leetcode.com/problems/merge-sorted-array/description/)|[README](./algorithms/merge_sorted_array)|Easy|\n|89|[Gray Code](https://leetcode.com/problems/gray-code/description/)|[README](./algorithms/gray_code)|Medium|\n|90|[Subsets II](https://leetcode.com/problems/subsets-ii/description/)|[README](./algorithms/subsets_ii)|Medium|\n|91|[Decode Ways](https://leetcode.com/problems/decode-ways/description/)|[README](./algorithms/decode_ways)|Medium|\n|92|[Reverse Linked List II](https://leetcode.com/problems/reverse-linked-list-ii/description/)|[README](./algorithms/reverse_linked_list_ii)|Medium|\n|93|[Restore IP Addresses](https://leetcode.com/problems/restore-ip-addresses/description/)|[README](./algorithms/restore_ip_addresses)|Medium|\n|94|[Binary Tree Inorder Traversal](https://leetcode.com/problems/binary-tree-inorder-traversal/description/)|[README](./algorithms/binary_tree_inorder_traversal)|Medium|\n|96|[Unique Binary Search Trees](https://leetcode.com/problems/unique-binary-search-trees/description/)|[README](./algorithms/unique_binary_search_trees)|Medium|\n|98|[Validate Binary Search Tree](https://leetcode.com/problems/validate-binary-search-tree/description/)|[README](./algorithms/validate_binary_search_tree)|Medium|\n|100|[Same Tree](https://leetcode.com/problems/same-tree/description/)|[README](./algorithms/same_tree)|Easy|\n|101|[Symmetric Tree](https://leetcode.com/problems/symmetric-tree/description/)|[README](./algorithms/symmetric_tree)|Easy|\n|102|[Binary Tree Level Order Traversal](https://leetcode.com/problems/binary-tree-level-order-traversal/description/)|[README](./algorithms/binary_tree_level_order_traversal)|Medium|\n|103|[Binary Tree Zigzag Level Order Traversal](https://leetcode.com/problems/binary-tree-zigzag-level-order-traversal/description/)|[README](./algorithms/binary_tree_zigzag_level_order_traversal)|Medium|\n|104|[Maximum Depth of Bianry Tree](https://leetcode.com/problems/maximum-depth-of-binary-tree/description/)|[README](./algorithms/maximum_depth_of_binary_tree)|Easy|\n|105|[Construct Binary Tree from Preorder and Inorder Traversal](https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/description/)|[README](./algorithms/construct_binary_tree_from_preorder_and_inorder_traversal)|Medium|\n|106|[Construct Binary Tree from Inorder and Postorder Traversal](https://leetcode.com/problems/construct-binary-tree-from-inorder-and-postorder-traversal/description/)|[README](./algorithms/construct_binary_tree_from_inorder_and_postorder_traversal)|Medium|\n|107|[Binary Tree Level Order Traversal II](https://leetcode.com/problems/binary-tree-level-order-traversal-ii/description/)|[README](./algorithms/binary_tree_level_order_traversal_ii)|Medium|\n|108|[Convert Sorted Array to Binary Search Tree](https://leetcode.com/problems/convert-sorted-array-to-binary-search-tree/description/)|[README](./algorithms/convert_sorted_array_to_binary_search_tree)|Medium|\n|109|[Convert Sorted List to Binary Search Tree](https://leetcode.com/problems/convert-sorted-list-to-binary-search-tree/description/)|[README](./algorithms/convert_sorted_list_to_binary_search_tree)|Medium|\n|110|[Balanced Binary Tree](https://leetcode.com/problems/balanced-binary-tree/description/)|[README](./algorithms/balanced_binary_tree)|Easy|\n|111|[Minimum Depth of Bianry Tree](https://leetcode.com/problems/minimum-depth-of-binary-tree/description/)|[README](./algorithms/minimum_depth_of_binary_tree)|Easy|\n|144|[Binary Tree Preorder Traversal](https://leetcode.com/problems/binary-tree-preorder-traversal/description/)|[README](./algorithms/binary_tree_preorder_traversal)|Medium|\n|145|[Binary Tree Postorder Traversal](https://leetcode.com/problems/binary-tree-postorder-traversal/description/)|[README](./algorithms/binary_tree_postorder_traversal)|Medium|\n|206|[Reverse Linked List](https://leetcode.com/problems/reverse-linked-list/description/)|[README](./algorithms/reverse_linked_list)|Easy|\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjack0pan%2Fleetcode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjack0pan%2Fleetcode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjack0pan%2Fleetcode/lists"}