{"id":17675775,"url":"https://github.com/dbz/algorithms","last_synced_at":"2025-04-16T03:49:10.999Z","repository":{"id":25157308,"uuid":"28580097","full_name":"Dbz/Algorithms","owner":"Dbz","description":"Data Structures \u0026 Algorithms. Includes solutions for Cracking the Coding Interview 6th Edition","archived":false,"fork":false,"pushed_at":"2023-03-16T05:40:07.000Z","size":278,"stargazers_count":90,"open_issues_count":1,"forks_count":21,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-29T04:51:12.441Z","etag":null,"topics":["algorithm","algorithm-challenges","algorithms","computer-science","cracking-the-coding-interview","data-structures","datastructures","graph","heap","javascript","python","queue","ruby","stack","stacks","sum","tree","trees","trie","tries"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/Dbz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2014-12-29T04:21:51.000Z","updated_at":"2025-01-06T01:54:43.000Z","dependencies_parsed_at":"2024-10-24T09:31:46.869Z","dependency_job_id":"4cd2f854-67fb-4142-8349-4b6d9d95a7a4","html_url":"https://github.com/Dbz/Algorithms","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/Dbz%2FAlgorithms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dbz%2FAlgorithms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dbz%2FAlgorithms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dbz%2FAlgorithms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Dbz","download_url":"https://codeload.github.com/Dbz/Algorithms/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249192472,"owners_count":21227795,"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":["algorithm","algorithm-challenges","algorithms","computer-science","cracking-the-coding-interview","data-structures","datastructures","graph","heap","javascript","python","queue","ruby","stack","stacks","sum","tree","trees","trie","tries"],"created_at":"2024-10-24T07:23:27.175Z","updated_at":"2025-04-16T03:49:10.983Z","avatar_url":"https://github.com/Dbz.png","language":"Ruby","readme":"Data Structures \u0026 Algorithms Repository\n==========\n\nThis is repository of data structures and algorithms written in JavaScript and Ruby. Some of the algorithms are from\n[Cracking the Coding Interview by Gayle Laakmann McDowell](http://www.amazon.com/gp/product/0984782850/ref=as_li_tl?ie=UTF8\u0026camp=1789\u0026creative=9325\u0026creativeASIN=0984782850\u0026linkCode=as2\u0026tag=dbz03-20\u0026linkId=LVVF6HDIDG3XQICI)\n.\n \n# Contributing\n\nContributions are welcome! Please read the [ Contributing guidelines](/CONTRIBUTING.md) and the [Code of Conduct](/CODE_OF_CONDUCT.md) on how to contribute.\nThis project is Licensed under the [MIT License](/LICENSE.md).\n \n## Ruby Instructions:\n \n To run Ruby specs, execute the `rspec` command in the terminal\n \n## JavaScript Instructions:\n \n To run JavaScript specs, execute the `rake jasmine` command in the terminal. Then open a web browser to\n http://localhost:8888/\n\n# Algorithms \u0026 Data Structures\n\n```\nKey\n- (R) means Ruby\n- (JS) means JavaScript\n- (P) means Python\n- (CtCI) means Cracking the Coding Interview\n- (DP) means Dynamic Programming\n```\n\n* Array - Binary Search Tree From Array ([R](/algorithms/binary_search_tree_from_array.rb))\n* Array - Contains Duplicate ([JS](/algorithms/contains-duplicate.js))\n* Array - Difference Between Arrays ([R](/algorithms/difference_between_arrays.rb))\n* Array - Find Single Number ([R](/algorithms/find_single_number.rb))\n* Array - Highest Product of 3 ([JS](/algorithms/highest-product-of-three.js))\n* Array - Longest Common Prefix ([R](/algorithms/longest_common_prefix.rb))\n* Array - Majority Element ([JS](/algorithms/majority-element.js))\n* Array - Make Change (CtCI)([JS](/algorithms/make-change.js))([R](/algorithms/make_change.rb)) \n* Array - Maxiumum Subsequence (CtCI)(DP)([R](/algorithms/max_subsequence.rb))\n* Array - Merge Two Sorted Lists ([JS](/algorithms/merge-two-sorted-lists.js))([R](/algorithms/merge_sorted_arrays.rb))\n* Array - Min Change Sum (CtCI)(DP)([R](/algorithms/min_change_sum.rb))\n* Array - Missing Number (CtCI)([R](/algorithms/missing_number.rb))\n* Array - Product of All Ints Except @ Index ([JS](/algorithms/product-of-ints.js))\n* Array - Quicksort ([JS](/algorithms/quicksort.js))\n* Array - Remove Value ([JS](/algorithms/remove-value.js))\n* Array - Rotate Array ([R](/algorithms/rotate_array.rb))\n* Array - Rotate Matrix (CtCI 1.7)([R](/algorithms/rotate_matrix.rb))([P](/algorithms/rotate_matrix.py))\n* Array - Shuffle in Place ([R](/algorithms/shuffle_array_in_place.rb))\n* Array - Stock Picker ([JS](/algorithms/stock-picker.js))\n* Array - Subsets ([JS](/algorithms/subsets.js))\n* Array - Summary Ranges ([R](/algorithms/summary_ranges.rb))\n* Array - Transpose ([JS](/algorithms/transpose.js))\n* Array - Traverse Spiral Matrix ([R](/algorithms/traverse_spiral_matrix.rb))\n* Array - Two Sum ([R](/algorithms/two_sum.rb))\n* Array - Zero Matrix (CtCI 1.8)([R](/algorithms/zero_matrix.rb))([P](/algorithms/zero_matrix.py))\n* Data Structure - Binary Tree ([JS](/data-structures/binary-tree.js))([R](/data-structures/binary_tree.rb))\n* Data Structure - Doubly Linked List ([R](/data-structures/doubly_linked_list.rb))\n* Data Structure - Hash Table ([JS](/data-structures/hash-table.js))\n* Data Structure - Min Heap ([R](/data-structures/min_heap.rb))\n* Data Structure - Queue ([JS](/data-structures/queue.js))\n* Data Structure - Queue with Two Stacks (CtCI)([JS](/data-structures/queue-with-two-stacks.js))\n* Data Structure - Singly Linked List ([R](/data-structures/singly_linked_list.rb))\n* Data Structure - Stack ([JS](/data-structures/stack.js))([R](/data-structures/linked_stack.rb))\n* Data Structure - Stack with Two Queues (CtCI)([JS](/data-structures/stack-with-two-queues.js))\n* Data Structure - Tree ([JS](/data-structures/tree.js))\n* Data Structure - Trie ([JS](/data-structures/trie.js))\n* Graph - Balanced Binary Tree ([R](/algorithms/balanced_binary_tree.rb))\n* Graph - Binary Tree Inorder Traversal ([R](/algorithms/binary_tree_inorder_traversal.rb))\n* Graph - Binary Tree Preorder Traversal ([R](/algorithms/binary_tree_preorder_traversal.rb))\n* Graph - Binary Tree to Linked List ([R](/algorithms/binary_tree_to_linked_list.rb))\n* Graph - Breadth First Search ([JS](/algorithms/JavaScript/breadth-first-search.js))([R](/algorithms/graph_breadth_first_search.rb))\n* Graph - Danny Search ([R](/algorithms/danny_search.rb))\n* Graph - Depth First Search ([JS](/algorithms/depth-first-search.js))([R](/algorithms/graph_depth_first_search.rb))\n* Graph - Dijkstras ([R](/algorithms/dijkstras.rb))\n* Graph - Invert Binary Tree ([JS](/algorithms/invert-binary-tree.js))([R](/algorithms/invert_binary_tree.rb))\n* Graph - Is Same Tree ([JS](/algorithms/is-same-tree.js))\n* Graph - Largest Internal Binary Search Tree ([R](/algorithms/largest_internal_binary_search_tree.rb))\n* Graph - Lowest Common Ancestor in BST (CtCI)([R](/algorithms/lowest_common_ancestor.rb))\n* Graph - Maximum Depth of Binary Tree ([JS](/algorithms/maximum-depth-of-binary-tree.js))([R](/algorithms/maximum_depth_of_binary_tree.rb))\n* Graph - Minimum Depth of Binary Tree ([JS](/algorithms/minimum-depth-of-binary-tree.js))([R](/algorithms/minimum_depth_of_binary_tree.rb))\n* Graph - Path Between Two Nodes (CtCI)([R](/algorithms/path_between_two_nodes.rb))\n* Graph - Root to Leaf Paths ([R](/algorithms/root_to_leaf_paths.rb))\n* Graph - Second Largest Value in Binary Tree ([JS](/algorithms/second-largest-binary-tree.js))\n* Graph - Symmetric Binary Tree ([JS](/algorithms/symmetric-binary-tree.js))\n* Graph - Topological Sort ([R](/algorithms/topological_sort.rb))\n* Graph - Tree Breadth First Search ([R](/algorithms/tree_breadth_first_search.rb))\n* Graph - Tree Path Equals Sum (CtCI)([R](/algorithms/tree_path_equals_sum.rb))\n* Graph - Valid Binary Tree ([R](/algorithms/valid_binary_tree.rb))\n* Linked List - Add Reverse Linked List Digits (CtCI)([R](/algorithms/add_reversed_linked_list_digits.rb))\n* Linked List - Animal Shelter (CtCI 3.6)([R](/algorithms/animal_shelter.rb))\n* Linked List - Delete Kth Node in Linked List ([R](/algorithms/delete_kth_node.rb))\n* Linked List - Delete Node in Linked List ([JS](/algorithms/delete-node-in-linked-list.js))\n* Linked List - Delete Middle Node in Linked List (CtCI 2.3)([R](/algorithms/delete_middle_node.rb))\n* Linked List - Find Linked List Cycle (CtCI)([R](/algorithms/find_linked_list_cycle.rb))\n* Linked LIst - Intersection of two lists (CtCI 2.7)([R](/algorithms/intersection.rb))\n* Linked List - Linked List Palindrome (CtCI)([R](/algorithms/linked_list_palindrome.rb))\n* Linked List - Loop Detection (CtCI 2.8)([R](/algorithms/loop_detection.rb))\n* Linked List - Palindrome (CtCI 2.6)([JS](/algorithms/palindrome.js))([R](/algorithms/palindrome_linked_list.rb))([R2](/algorithms/palindrome.rb))\n* Linked List - Partition Linked List (CtCI)([R](/algorithms/partition_linked_list.rb))\n* Linked List - Return Kth to last node (CtCI 2.2)([R](/algorithms/return_kth_to_last_element.rb))\n* Linked List - Remove Duplicates in Linked List (CtCI 2.1)([R](/algorithms/remove_duplicates_in_linked_list.rb))\n* Linked List - Reverse Linked List ([JS](/algorithms/reverse-linked-list.js))\n* Linked List - Sum Lists (CtCI 2.5)([R](/algorithms/sum_lists.rb))\n* Misc - Climbing Stairs ([JS](/algorithms/climbing-stairs.js))\n* Misc - Count Primes ([R](/algorithms/count_primes.rb))\n* Misc - Digital Root ([JS](/algorithms/digital-root.js))\n* Misc - Fibonacci Number ([JS](/algorithms/fibonacci-number.js))\n* Misc - First Bad Version ([R](/algorithms/first_bad_version.rb))\n* Misc - Hamming Weight ([JS](/algorithms/hamming-weight.js))\n* Misc - HiCal ([JS](/algorithms/hical.js))\n* Misc - Pascal's Triangle ([R](/algorithms/pascals_triangle.rb))\n* Misc - Power of 2 ([JS](/algorithms/power-of-two.js))\n* Misc - Rate Limiter ([R](/algorithms/rate_limiter.rb))\n* Misc - Seive of Erastenous ([R](/algorithms/seive_of_erastenous.rb))\n* Stack - Sort Stack (CtCI 3.5)([R](/algorithms/sort_stack.rb))\n* String - Add Binary ([R](/algorithms/add_binary.rb))\n* String - Anagrams ([JS](/algorithms/JavaScript/anagrams.js))([R](/algorithms/anagrams.rb))\n* String - Balanced Parens ([JS](/algorithms/balanced-parens.js))\n* String - String Compression (CtCI 1.6)([R](/algorithms/string_compression.rb))([P](/algorithms/string_compression.py))\n* String - Caeser Cipher ([R](/algorithms/caesar_cipher.rb))\n* String - Encode URL (CtCI)([R](/algorithms/encode_url.rb))\n* String - Is Substring (CtCI)([R](/algorithms/string_is_substring.rb))\n* String - Isomorphic Strings ([R](/algorithms/isomorphic_strings.rb))\n* String - One Edit Away (CtCI)([R](/algorithms/one_edit_away.rb))([P](/algorithms/one_away.py))\n* String - Permutation Palindrome (CtCI 1.4)([JS](/algorithms/permutation-palindrome.js))([R](/algorithms/permutation_palindrome.rb))([P](/algorithms/palindrome_permutation.py))\n* String - Permutation Strings (CtCI 1.2)([R](/algorithms/permutations_strings.rb))([P](/algorithms/check_permutation.py))\n* String - Remove Duplicates in Text ([R](/algorithms/remove_duplicates.rb))\n* String - Reverse Characters and String (CtCI)([R](/algorithms/reverse_characters_and_string.rb))\n* String - Roman Numeral -\u003e Integer ([JS](/algorithms/roman-numeral-to-integer.js))\n* String - String Rotation (CtCI 1.9)([R](/algorithms/string_rotation.rb))\n* String - Substrings ([JS](/algorithms/substrings.js))\n* String - Unique Characters (CtCI 1.1)([R](/algorithms/is_unique.rb))([P](/algorithms/is_unique.py))\n* String - Valid Anagram ([JS](/algorithms/valid-anagram.js))\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbz%2Falgorithms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdbz%2Falgorithms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbz%2Falgorithms/lists"}