an application of insert sort
cs101 on udacity