text: Driver Code
code: $ arr1 = array ( 5 , 6 , 1 , 2 , 3 , 4 ) ; $ n1 = sizeof ( $ arr1 ) ; echo " The ▁ minimum ▁ element ▁ is ▁ " . findMin ( $ arr1 , 0 , $ n1 - 1 ) . " STRNEWLINE " ; $ arr2 = array ( 1 , 2 , 3 , 4 ) ; $ n2 = sizeof ( $ arr2 ) ; echo " The ▁ minimum ▁ element ▁ is ▁ " . findMin ( $ arr2 , 0 , $ n2 - 1 ) . " STRNEWLINE " ; $ arr3 = array ( 1 ) ; $ n3 = sizeof ( $ arr3 ) ; echo " The ▁ minimum ▁ element ▁ is ▁ " . findMin ( $ arr3 , 0 , $ n3 - 1 ) . " STRNEWLINE " ; $ arr4 = array ( 1 , 2 ) ; $ n4 = sizeof ( $ arr4 ) ; echo " The ▁ minimum ▁ element ▁ is ▁ " . findMin ( $ arr4 , 0 , $ n4 - 1 ) . " STRNEWLINE " ; $ arr5 = array ( 2 , 1 ) ; $ n5 = sizeof ( $ arr5 ) ; echo " The ▁ minimum ▁ element ▁ is ▁ " . findMin ( $ arr5 , 0 , $ n5 - 1 ) . " STRNEWLINE " ; $ arr6 = array ( 5 , 6 , 7 , 1 , 2 , 3 , 4 ) ; $ n6 = sizeof ( $ arr6 ) ; echo " The ▁ minimum ▁ element ▁ is ▁ " . findMin ( $ arr6 , 0 , $ n6 - 1 ) . " STRNEWLINE " ; $ arr7 = array ( 1 , 2 , 3 , 4 , 5 , 6 , 7 ) ; $ n7 = sizeof ( $ arr7 ) ; echo " The ▁ minimum ▁ element ▁ is ▁ " . findMin ( $ arr7 , 0 , $ n7 - 1 ) . " STRNEWLINE " ; $ arr8 = array ( 2 , 3 , 4 , 5 , 6 , 7 , 8 , 1 ) ; $ n8 = sizeof ( $ arr8 ) ; echo " The ▁ minimum ▁ element ▁ is ▁ " . findMin ( $ arr8 , 0 , $ n8 - 1 ) . " STRNEWLINE " ; $ arr9 = array ( 3 , 4 , 5 , 1 , 2 ) ; $ n9 = sizeof ( $ arr9 ) ; echo " The ▁ minimum ▁ element ▁ is ▁ " . findMin ( $ arr9 , 0 , $ n9 - 1 ) . " STRNEWLINE " ; ? >