For software engineering problems, it surprises me that he puts #5 after #4. For #5, it is almost immediately clear that brute-forcing it will work (there are 3^8 solutions to place pluses, minuses, and 'nothings' between those nine digits. That is 81^2, way less than 10000)<p>#4, on the other hand, may have an input with a million integers that would probably make that Java solution, with all its toString calls _and_ string concatenations inside the comparison function that will get called in the ballpark of a billion times, slow down to a crawl.<p>That's why the proposed solution to #4 is not that of a software _engineer_. An engineer would convert those integers to strings only once. He might keep the concatenations around because they aren't shown to be problematic yet.