If bit is set append '5' else append '4'
bool bit = mask & rank ; if ( bit ) { left += y ; right += y ; } else { left += x ; right += x ; } } reverse ( right . begin ( ) , right . end ( ) ) ; return left + right ; }