At the underwater research station, a team of scientists are analyzing sonar signals to detect unique marine life patterns. The signals are represented as a sequence of numbers, and the team needs to identify the first occurrence of each unique signal. The signal sequence is very long, and the team requires an efficient algorithm to process the signals. The algorithm should return a list of the first occurrence index of each unique signal in the sequence.
Analyze constraints and compute optimal solutions step-by-step.
No dry run loaded.
🚀 Practice this problem
Run code, get AI hints & track streak