Pergunta de entrevista da empresa Johnson Controls

Find the leaders in the given array using efficient data structures and algorithms.