1)1)Find maximum and minimum element

Source Code: