@AmyXyy Hi AmyXyy. I actually saw some people propose that we only need to consider the second, third and fourth ones. But there is no easy way to prove that. Considering the middle three results or all six results does not make a difference regarding the time complexity, though the former may be more efficient for large N.
4 Keys Keyboard