#no-std #intro-to-algorithms #alogrithms

no-std algorithms-rs

Implementation of The Introduction to Algorithms Thrid Edition By Rust programming Language

12 releases

0.1.11 Mar 11, 2023
0.1.10 Dec 20, 2022
0.1.8 Nov 14, 2022
0.1.5 Aug 8, 2022

#880 in Algorithms

48 downloads per month

MIT license

45KB
1K SLoC

algorithms-rs

build status

Introduction to algorithms thrid edition implement by rust programming

算法导论

Present implement

Data Struct

  • Heap
    • rec build heap
      • max_heapify
        • max_heapify function
      • min-heapify
        • min_heapify function
    • no rec build heap
      • min_sift
        • min_sift_up function
        • min_sift_down function
      • max_sift
        • max_sift_up function
        • max_sift_down function
    • max heap
      • max_shift_up
        • build_max_heap_by_shift_up function
      • max_heapify
        • build_max_heap_by_max_heapify function
    • min heap
      • min_shift_up
        • build_min_heap_by_siftup function
      • min_heapify
        • build_min_heap_by_min_heapify function
    • heap sort algorithms
      • asc sort by Max-Heap by Max heapify
        • heap_sort_by_max_heap function
      • dec sort by Min-Heap by Min Heapify
        • heap_sort_by_min_heap function
      • asc sort by Max-Heap by Max shift_up and shift_down
        • asc_sort_with_max_sift function
      • dec sort by Min-Heap by Min Shift_up and shift_down
        • dec_sort_with_min_sift function
  • Stack
    • push element
    • pop element
  • Queue
    • pop head element
    • push tail element

Sort algorithms

  • Bubble Sort algorithms
  • Insert Sort algorithms
  • Select Sort algorithms
  • Merge Sort algorithms, but not only support ascending order

support no-std feature

config setting:

algorithms-rs = { version = "0.1", default-features = false }

Dependencies

~1MB
~25K SLoC