IBM OA real questions exposed | Full analysis of the two HackerRank questions, is it difficult to take a 10-minute session?

21 Views
No Comment

2.27 Just finished a show IBM OA, the overall rhythm is very tight. This time it was completed on the HackerRank platform. The interface is relatively conventional and supports self-testing and running hidden use cases after submission. There is no problem with system stability. The amount of questions is two coding. The time given is not particularly long, but it is not stressful either. As long as the ideas are clear and the implementation is proficient, you can complete it in 10 to 20 minutes.

IBM OA real questions exposed | Full analysis of the two HackerRank questions, is it difficult to take a 10-minute session?

Q1 Minimum number of meeting rooms

You are given n meetings, each meeting has a start time and an end time. It is required to arrange meeting rooms so that meetings in the same meeting room cannot overlap in time. Note that if one meeting ends at time t and another starts at time t, the two do not overlap and can use the same conference room. Finally, return the minimum number of conference rooms required.

Idea: The method is to sort all the start times and end times separately, and then use two pointers to scan from front to back. If the current start time is earlier than the earliest end time, it means that the meetings overlap and an additional room needs to be opened; otherwise, it means that a meeting has ended and the room can be reused. The maximum number of simultaneous meetings recorded during the process is the minimum number of meeting rooms.

Q2 Message thread classification

Question meaning of Q2: Given n messages, each message contains timestamp, reply object index and text content. If a message replies with -1, it is the initiator of the conversation (parent message); otherwise it is a reply to a message (child message). We need to return a two-dimensional array, where each sub-array represents a complete conversation thread.

Idea: First, establish a mapping based on replyTo, treat the message with the reply object -1 as the "root node", and use a hash table to extract all the sub-messages belonging to the same root node and return them to their respective locations. Then the order of processing: the outer layer queues different threads according to the timestamp of the root message to decide who appears in the big list first; the inner layer keeps the root message at the top, and the remaining sub-messages are arranged according to the timestamp from old to new. Finally, fill in the text content into the two-dimensional array according to this arranged skeleton and return it.

IBM/big factory OA real-time assist support

If you have recently been preparing for OA from IBM or other major manufacturers, but you are always stuck on time rhythm, boundary conditions or hidden use cases, the problem is often not "no" but "insufficient stability in actual combat". We have long been sorting out high-frequency OA question types from mainstream companies in North America, including real question models from platforms such as HackerRank / CodeSignal / Niuke, etc., and also support real-time testing during official exams. OA assist , help you avoid low-level mistakes and steadily win the questions you know how to solve.

author avatar
Jory Wang Amazon Senior Software Development Engineer
Amazon senior engineer, focusing on the research and development of infrastructure core systems, with rich practical experience in system scalability, reliability and cost optimization. Currently focusing on FAANG SDE interview coaching, helping 30+ candidates successfully obtain L5/L6 Offers within one year.
END
 0