1. Insertion sort implementation. 2. Check for stability for sorted arrays.