Added random array generation and functionality to check whether array is sorted or not..