Citadel Interview Question

prefix tree type coding question