you give 0indexed integer array num a pair indice j bad pair j j numsj numsireturn total number bad pair num Example 1input num 4133output 5explanation the pair 0 1 bad pair 1 0 1 4the pair 0 2 bad pair 2 0 3 4 2 1the pair 0 3 bad pair 3 0 3 4 3 1the pair 1 2 bad pair 2 1 3 1 1 2the pair 2 3 bad pair 3 2 3 3 1 0there total 5 bad pair return 5example 2input num 12345output 0explanation there bad pair Constraints1 numslength 1051 numsi 109