Pergunta de entrevista da empresa Amazon

2 DSA questions related to strings, arrays and greedy algorithm.