Compare left and right bits and converge
if ( isKthBitSet ( x , l ) != isKthBitSet ( x , r ) ) : NEW_LINE INDENT return 0 NEW_LINE DEDENT l -= 1 NEW_LINE r += 1 NEW_LINE return 1 NEW_LINE def findNthPalindrome ( n ) : NEW_LINE pal_count = 0 NEW_LINE