2025 Booking Hackerrank OA | A Comprehensive Guide

1,402 Views

Recently attended Booking.com 2025 School Recruitment HackerRank OA, 90 minutes, three programming questions. The overall difficulty level is not particularly high, but the questions are designed to be close to the actual business, examining the combined use of data structures, strings and arrays.
The pace of the whole exam is tight, and time management is especially important. Luckily, I used Programhelp's no-trace online ghostwriting, with professional engineers in the background to help me write code synchronously, which saved a lot of time for debugging and input/output, and allowed me more time to check and optimize my thoughts.

2025 Booking Hackerrank OA | A Comprehensive Guide

QUESTION 1

In a game, there is an array of cells, each with an integer value. In one move, merge any two cells to obtain a new cell that contains the sum of the two cells. In a game, there is an array of cells, each with an integer value. In one move, merge any two cells to obtain a new cell that contains the sum of the two cells. The goal is to merge the cells until only one cell remains.

Example: cells = [20, 30, 40]

  1. Select cells with values 20 and 30 and merge them to obtain [50, 40]. The power needed for this move is 20 + 30 = 50.
  2. Select cells with values 50 and 40 and merge them to obtain [90]. The power needed for this move is 50 + 40 = 90.

The total power required is 50 + 90 = 140. This is the minimum possible power.

Function Description

Complete the function minPower in the editor.

minPower has the following parameter.

  • int cells[n]: the values of each cell

Returns

  • int: the minimum power required to finish the game

Constraints

  • 2 ≤ n ≤ 105
2025 Booking Hackerrank OA | A Comprehensive Guide

QUESTION 2

Given array = [6, 15, 2, 4, 3, 8, 19]. After applying heapify operation on the array, the array will look like.

Pick ONE option

  • [19, 15, 6, 4, 3, 8, 2]
  • [19, 6, 15, 4, 3, 8, 2]
  • [19, 15, 4, 6, 3, 8, 2]
  • [19, 6, 15, 8, 4, 3, 2]

Q3 is the most difficult of all the questions, here only the text is not good to post the whole question, you canContact me for a screenshot of the title

Q3 is the most difficult of all the questions. It's not feasible to convey the entire problem statement with text alone. Please contact me to obtain a screenshot of the question.

QUESTION 3

A warehouse manager must optimize the allocation of resources in their warehouse. There are two rows of storage units, having lengths N And m The manager wants to allocate new resources in these empty units such that the total number of resources in both rows is equal. The manager wants to allocate new resources in these empty units such that the total number of resources in both rows is equal. Return the minimum equal total number of resources in each row, or -1 if such allocation is not possible. The manager wants to allocate new resources in these empty units such that the total number of resources in both rows is equal.

2025 Booking Hackerrank OA | A Comprehensive Guide

Question 4

It is not convenient to post the picture of Q4. If you need it, you can scan the QR code and contact me.

FAQ

Q: Is Booking OA difficult?
A: Moderately difficult, focusing on basic algorithms and coding implementations, where details and boundary conditions are important.

Q: Is it safe to write on-line without a trace?
A: Very secure, the code entry process is completely local, leaving no traces of the operation, and the code style is consistent with what you normally write, and will not be detected.

Q: Do I have to prepare it myself if I have a ghostwriter?
A: Ghostwriting is an auxiliary tool, it is best to prepare in advance, ghostwriting can help you to stabilize the pace, to avoid getting stuck, and to help you escort you at the critical moment.

This OA is still very simple, and students who have the strength can completely venture into it. Students with weak foundation can try to get our assistance. If you are afraid that you can't solve the OA by yourself, please scan the codeContact me

author avatar
Jack Xu MLE | Microsoft Artificial Engineer
Ph.D. From Princeton University. He lives overseas and has worked in many major companies such as Google and Apple. The deep learning NLP direction has multiple SCI papers, and the machine learning direction has a Github Thousand Star⭐️ project.
END