Skip to content

Instantly share code, notes, and snippets.

#DBC Prep Objectives

For any technical support, please feel free to scope out and post in the Dev Bootcamp Help Facebook group.


1. Personal Preparation

Keep track of the your explanations and results below. You will be asked to submit your responses prior to entering Phase 0.

Learning Objectives
@jayrobin
jayrobin / Sorting Algorithms
Last active August 29, 2015 13:57
A selection of basic sorting algorithms in Ruby
module SortAlgorithms
def self.benchmark(iterations, method, array)
start_time = Time.now
iterations.times { |i| method.call(array.clone) }
Time.now - start_time
end
def self.bubble_sort(array)
array.each do |elem|
(array.size - 1).times do |i|