You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
return Math.max(robSub(nums, 0, len - 2), robSub(nums, 1, len - 1)); //since the last one is the first one neighbor. so if we steal the first one then we cannot steal the last one
}
private int robSub(int[] nums, int start, int end){