Improved performance by sorting the inputted vector first.
Added hackerrank's test4.
Updated files to remove useless comments, and updated submission file to reflect current changes. All tests were passed on hackerrank.