what is the syntax of sort function
explain in detail
Sort function explaination
@Bhavit_Singla sort() function usually takes two inputs, the starting point and ending point of the array it has to sort. For eg: lets assume an integer array arr of length n, then the starting point, i.e. the address of the 1st element will be arr and the address of the last index will be arr+n-1. So in sort function we pass arr and arr+n as the starting and ending point for the sorting. Hence the syntax is sort(arr,arr+n) . It will iterate will arr+n-1.
Hope this helps.