Citadel Securities interview question

medium to hard Leet code questions