Driver code
public static void Main ( ) { int [ ] arr1 = { 10 , 5 , 2 , 7 , 10 } ; int n1 = arr1 . Length ; Console . WriteLine ( minTime ( arr1 , n1 ) ) ; int [ ] arr2 = { 10 , 5 , 7 , 10 } ; int n2 = arr2 . Length ; Console . WriteLine ( minTime ( arr2 , n2 ) ) ; int [ ] arr3 = { 10 , 5 , 2 , 4 , 8 , 6 , 7 , 10 } ; int n3 = arr3 . Length ; Console . WriteLine ( minTime ( arr3 , n3 ) ) ; } }