Adding code implementation for insertion sort