you give array num you rotate nonnegative integer k array numsk numsk 1 numsnumslength 1 nums0 nums1 numsk1 afterward entry equal index worth pointfor example num 24130 rotate k 2 13024 this worth 3 point 1 0 point 3 1 point 0 2 point 2 3 point 4 4 pointreturn rotation index k correspond high score achieve rotate num if multiple answer return small index k Example 1input num 23140output 3explanation Scores k list k 0 num 23140 score 2k 1 num 31402 score 3k 2 num 14023 score 3k 3 num 40231 score 4k 4 num 02314 score 3so choose k 3 high scoreexample 2input num 13024output 0explanation num 3 point matter shiftsSo choose small k 0 constraints1 numslength 1050 numsi numslength