Citadel Interview Question

Problem solving in hardware computation question.