Insertion is a very simple and common sense approach to the sorting problem. It is stable, in-place, online, and efficient for small data sets and data sets that are already mostly sorted. Here we examine Insertion Sort in Ruby.

The Knapsack Problem is an NP combinatorial optimization problem in which items that have both value and weight are placed into a "knapsack" with a weight limit. Here a genetic algorithm is used to evolve good solutions.