Pergunta de entrevista da empresa Morgan Stanley

Mainly focused on dsa and java Asked to sort list of employees based on its id using java8. Given an array and target, find the indices from the array whose sum is equals to the target. The solution should be in O(n)