If is used double times

Can we use the else block instead the another if

@Saumya123456789 NO,if you will use the else block instead of another if it will give you a wrong answer.
for example if size of array is 1 and array element is {5} . so 5 will be both largest and smallest element of the array , but since you have used the else block instead of if block ,it will not check for the smallest condtion and you will get a wrong answer.