{"id":13416403,"url":"https://github.com/kanwei/algorithms","last_synced_at":"2025-05-15T00:04:26.729Z","repository":{"id":44930086,"uuid":"32958","full_name":"kanwei/algorithms","owner":"kanwei","description":"Ruby algorithms and data structures. C extensions","archived":false,"fork":false,"pushed_at":"2025-04-15T23:24:03.000Z","size":1029,"stargazers_count":2694,"open_issues_count":17,"forks_count":350,"subscribers_count":105,"default_branch":"master","last_synced_at":"2025-05-07T22:44:59.073Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://kanwei.github.io/algorithms/","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/kanwei.png","metadata":{"files":{"readme":"README.markdown","changelog":"CHANGELOG.markdown","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,"zenodo":null}},"created_at":"2008-07-10T09:55:11.000Z","updated_at":"2025-04-24T00:48:49.000Z","dependencies_parsed_at":"2024-05-01T13:19:56.587Z","dependency_job_id":"1f40f50c-9c72-412d-925b-073ab9c51b54","html_url":"https://github.com/kanwei/algorithms","commit_stats":{"total_commits":223,"total_committers":14,"mean_commits":"15.928571428571429","dds":0.1300448430493274,"last_synced_commit":"5926f80c2fb2ff21318246ccbf6e78cc3b855103"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kanwei%2Falgorithms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kanwei%2Falgorithms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kanwei%2Falgorithms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kanwei%2Falgorithms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kanwei","download_url":"https://codeload.github.com/kanwei/algorithms/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254249199,"owners_count":22039029,"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-07-30T21:00:58.331Z","updated_at":"2025-05-15T00:04:26.639Z","avatar_url":"https://github.com/kanwei.png","language":"Ruby","readme":"# algorithms [![Ruby CI](https://github.com/kanwei/algorithms/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/kanwei/algorithms/actions/workflows/ci.yml)\n\n[API Documentation](http://kanwei.github.io/algorithms/)\n\n## DESCRIPTION:\n\nStarted as a [Google Summer of Code 2008](http://code.google.com/soc/2008/ruby/about.html) project\n\nWritten by [Kanwei Li](http://kanwei.com/), mentored by Austin Ziegler\n\n## Original Proposal: ##\n\nUsing the right data structure or algorithm for the situation is an important\naspect of programming. In computer science literature, many data structures\nand algorithms have been researched and extensively documented. However, there\nis still no standard library in Ruby implementing useful structures and\nalgorithms like Red/Black Trees, tries, different sorting algorithms, etc.\nThis project will create such a library with documentation on when to use a\nparticular structure/algorithm. It will also come with a benchmark suite to\ncompare performance in different situations.\n\n## COMPLETED:\n\n    * Heaps              Containers::Heap, Containers::MaxHeap, Containers::MinHeap\n    * Priority Queue     Containers::PriorityQueue\n    * Deque              Containers::Deque, Containers::CDeque (C ext)\n    * Stack              Containers::Stack\n    * Queue              Containers::Queue\n    * Red-Black Trees    Containers::RBTreeMap, Containers::CRBTreeMap (C ext)\n    * Splay Trees        Containers::SplayTreeMap, Containers::CSplayTreeMap (C ext)\n    * Tries              Containers::Trie\n    * Suffix Array       Containers::SuffixArray\n\n    * Search algorithms\n      - Binary Search            Algorithms::Search.binary_search\n      - Knuth-Morris-Pratt       Algorithms::Search.kmp_search\n    * Sorting algorithms           \n      - Bubble sort              Algorithms::Sort.bubble_sort\n      - Comb sort                Algorithms::Sort.comb_sort\n      - Selection sort           Algorithms::Sort.selection_sort\n      - Heapsort                 Algorithms::Sort.heapsort\n      - Insertion sort           Algorithms::Sort.insertion_sort\n      - Shell sort               Algorithms::Sort.shell_sort\n      - Quicksort                Algorithms::Sort.quicksort\n      - Mergesort                Algorithms::Sort.mergesort\n      - Dual-Pivot Quicksort     Algorithms::Sort.dualpivotquicksort\n\n## SYNOPSIS:\n\n    require 'rubygems'\n    require 'algorithms'\n\n    max_heap = Containers::MaxHeap.new\n\n    # To not have to type \"Containers::\" before each class, use:\n    include Containers\n    max_heap = MaxHeap.new\n\n## REQUIREMENTS:\n\n* Ruby 1.8, Ruby 1.9, JRuby\n* C extensions (optional, but very much recommended for vast performance benefits)\n\n## LICENSE:\n\nSee [LICENSE.md](LICENSE.md).\n","funding_links":[],"categories":["Ruby","Github Libraries","Scientific"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkanwei%2Falgorithms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkanwei%2Falgorithms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkanwei%2Falgorithms/lists"}