Skip to content

rebase-master/sortech

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status Gem Version

Sortech

Sort arrays using different sorting techniques

Installation

gem install sortech

or add it to your gemfile:

gem 'sortech'

and run bundle install

Usage

require 'sortech'
arr = Array.new(20){rand(1..100000)}.shuffle
puts "Original Array: "
arr.each{|item| p item}
arr = Sortech::Sort.bubble(arr)
puts "Sorted Array: "
arr.each{|item| p item}

Methods available for sorting techniques

  • Bubble sort (Sortech::Sort.bubble)
  • Selection sort (Sortech::Sort.selection)
  • Insertion sort (Sortech::Sort.insertion)
  • Quick Sort (Sortech::Sort.quicksort)
  • Merge Sort (Sortech::Sort.mergesort)

About

Sort arrays using different sorting techniques.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages