Frage im Vorstellungsgespräch bei Microsoft

DSA based question including competetive programming.