package com.sbs.sort; /** * @author Bhargava * * Time Complexity of Insertion Sort is O(n power 2) Worst Case O(n) best case * Recommended for Smallest array of elements. * If you observe Array.sort() method in java.util api, if the array length is smaller than 7 our api is following * insertion sort. */ public class InsertionSort { /** * @param args */ public static void main(String[] args) { long intialTime = System.currentTimeMillis(); int[] array = { 24, 13, 9, 64, 7, 23, 34, 47 }; System.out.print(" Befor Sorting [ "); for (int j = 0; j < array.length; j++) { ...