The first approach detailed in the solution results in a TLE (tried with both my own code and yours, Java and C++). Please adjust the solution text to advise the reader that the first approach is NOT ...