Question d’entretien chez IBM

Two leetcode problems, using binary operations.