This year IBM OA is actually not low, and many students who voted for NG SDE have received invitations one after another. The overall style is still a relatively typical Hackerrank mode, with two coding steps and plenty of time, but it requires a certain level of proficiency to master AC once. If you usually have a solid foundation in algorithms, this set of questions will fall into the category of "you won't panic if you see similar models". I passed it relatively smoothly this time. I will sort out the core ideas of the two questions below to provide a reference for students who want to do OA later.
OA overall experience
The process is very straightforward, with no bells and whistles, just a standard online programming test. The difficulty of the questions ranges from easy to medium, but they all have obvious model directions. The essence is to test whether you have the ability to quickly identify the question type. It is recommended not to take it lightly just because the company's reputation is not like that of FAANG. Instead, many people overturned on this kind of OA that "doesn't look difficult". The common problem is not that the algorithm is not good, but that the basic skills are not stable enough. For example, small bugs are prone to occur when writing code, boundary conditions are not fully considered, or the rhythm of the problem is not controlled well, and the time spent in the front is too long, which results in the later time being compressed.
Q1: Determine whether the log status is legal
Group logs according to service ID (sid), and check whether the log status change sequence in each group strictly follows the "DOWN→UP→DOWN→UP..." alternation rule. After grouping by sid, each group is sorted by timestamp. Check whether the sequence matches: the first one must be DOWN, and the two adjacent ones must be in different states (alternately). If it does not match, the number of illegal log groups is accumulated.
Q2: Shortest subarray + k increasing elements
Find a shorter subarray in the arrangement so that k increasing numbers can be selected from the subarray. Record the position of each value in the original arrangement. Use a sliding window to maintain a position interval to ensure that the number of different values in the window is ≥ k. When the window meets the conditions, the shorter length is updated and the sliding window finds the optimal solution.
Interview preparation advice
If you have recently received an OA from IBM or other major manufacturers, it is recommended that you try to familiarize yourself with high-frequency question types and common models in advance. Many of the questions themselves are not particularly difficult, but if there is no systematic preparation, it is still easy to be disrupted on the spot. Reading more real questions and solution ideas will help you build a feel for doing the questions, and you can also be more calm during the formal test and maximize your passing probability. Need OA traceless assist You can also contact us directly, we have helped hundreds of students get their favorite offers.