I really like the use of max to reduce recursions. Just a tiny trick, but speed up from 26ms to 4ms on my computer. THANKS FOR SHARING~
Posts made by amber723
RE: 2ms beats 90% Java solution, a small trick to end search early
RE: Java 4ms Solution beats 99% inspired by 3 sum.
Maybe you can set
int closest = nums + nums + nums[len - 1];
int closest = Integer.MAX_VALUE;