• + 2 comments

    why sorting? just add all nums in first input loop and in next loop find min and max