Pergunta de entrevista da empresa MicroStrategy

Next smallest and next largest with the same number of set bits.(CTCI bit manipulation chapter)