• + 0 comments

    add x=arr[0],max=x; before the second loop