Citadel interview question

2 medium leetcodes for online test. common problems