This is a verified interview question from Microsoft. Candidates reporting seeing this problem in recent Online Assessments (OAs) and onsite rounds. Mastering "Find Error Codes - Microsoft OA IIT Roorkee" covers key patterns like Other.
"You are given log entries represented by two arrays: - **timestamps**: event times in seconds, sorted in non-decreasing order - **errorCodes**: the error code recorded at each corresponding timestamp Given integers *k* and *l*, consider the last *l* seconds of logs, defined as: - `timestamps[n - 1] - timestamps[n - l - 1]` Find all error codes that: - Appear at least *k* times within this time window Return: - A list of all such error codes, sorted in **increasing lexicographical order** - An empty list if none meet the requirement "
Join thousands of developers practicing for Microsoft.