Pergunta de entrevista da empresa Amazon

DS Coding questions one from strings and other from graphs