[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-7928":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":17,"stars30d":17,"stars90d":16,"forks30d":16,"starsTrendScore":18,"compositeScore":19,"rankGlobal":10,"rankLanguage":10,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":21,"hasPages":23,"topics":24,"createdAt":10,"pushedAt":10,"updatedAt":25,"readmeContent":26,"aiSummary":27,"trendingCount":16,"starSnapshotCount":16,"syncStatus":28,"lastSyncTime":29,"discoverSource":30},7928,"algorithms","kanwei\u002Falgorithms","kanwei","Ruby algorithms and data structures. C extensions","http:\u002F\u002Fkanwei.github.io\u002Falgorithms\u002F",null,"Ruby",2697,346,103,13,0,1,3,62.22,"MIT License",false,"master",true,[],"2026-06-12 04:00:36","# algorithms [![Ruby CI](https:\u002F\u002Fgithub.com\u002Fkanwei\u002Falgorithms\u002Factions\u002Fworkflows\u002Fci.yml\u002Fbadge.svg?branch=master)](https:\u002F\u002Fgithub.com\u002Fkanwei\u002Falgorithms\u002Factions\u002Fworkflows\u002Fci.yml)\n\n[API Documentation](http:\u002F\u002Fkanwei.github.io\u002Falgorithms\u002F)\n\n## DESCRIPTION:\n\nStarted as a [Google Summer of Code 2008](http:\u002F\u002Fcode.google.com\u002Fsoc\u002F2008\u002Fruby\u002Fabout.html) project\n\nWritten by [Kanwei Li](http:\u002F\u002Fkanwei.com\u002F), 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\u002FBlack Trees, tries, different sorting algorithms, etc.\nThis project will create such a library with documentation on when to use a\nparticular structure\u002Falgorithm. 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","该项目提供了多种算法和数据结构的Ruby实现，包括C语言扩展以提高性能。核心功能涵盖了红黑树、堆、队列等常用数据结构及排序、搜索等多种经典算法，并且通过C扩展显著提升了执行效率。适合需要在Ruby项目中高效运用复杂数据结构或算法的场景，如数据分析、计算机科学研究以及对性能有较高要求的应用开发。",2,"2026-06-11 03:15:08","top_language"]