Hi,
I had the opportunity to interview for Oracle. It was a Phone Screen round. The question asked was easy, I won't call it simple though. A form of this question was available on LeetCode. I messed up as I did not think clearly. The question was as follows.
A log file with errors was provided and a number, 'm' was given. 'm' is the number of most frequent errors in that log file. So if m is 1 you have to find the most frequent error in the file. If m is 2 then you have to find the most and second most frequent error from the log file. In case of a tie prefer the alphabetically greater error followed by lower one if value of m allows so on the file.
Hint: Implementing PriorityQueue can help optimize the question.
The interviewer was friendly and hinted in the right direction.