Accenture interview question

String, array,graph, greedy, algorithm question asked