you give array num consist nonnegative integer let define revx reverse nonnegative integer x for example rev123 321 rev120 21 a pair indice j nice satisfie follow conditions0 j numslengthnumsi revnumsj numsj revnumsiReturn number nice pair index since number large return modulo 109 7 Example 1input num 4211197output 2explanation the pair 03 42 rev97 42 79 121 97 rev42 97 24 121 12 11 rev1 11 1 12 1 rev11 1 11 12example 2input num 1310352476output 4 constraints1 numslength 1050 numsi 109