implement smaller than n by rearranging nums alg