Bitwise interview question

Join query