Got a call from recruiter and they explained about the opertunity and scheduled a pair programming technical round telephonic with hacker rank.
In technical round, 3 engineers joined and posted two question. The duration was 1Hr.
Implement Backspacing.
i/p -> "abc#def##"
o/p -> "abd"
Say we got the black box from airoplace crach, There is huge set of log files with contents unsorted. We need to fetch the lastet half an hour log. desig an suitable algorithm to fetch lastest half an hour log statement. the formate of log statement would be
<DD-MM-YYYY HH:MM:SS:sss> <LogStatement>
example - 02-01-2014 10:02:01:001 abcd
Following this round, there was one more recruiter round explain about the feedback and they invited to Amsterdam.
The Onsite interview had
Data set to work on =>
{
176 : [
{
"price" : 120,
"features" : ["breakfast", "refundable"],
"availbility" : 5
}
],
177 : [
{
"price" : 130,
"features" : ["breakfast"],
"availbility" : 1
},
{
"price" : 140,
"features" : ["breakfast", "refundable", "wifi"],
"availbility" : 3
}
],
178 : [
{
"price" : 130,
"features" : ["breakfast"],
"availbility" : 2
},
{
"price" : 140,
"features" : ["breakfast", "refundable", "wifi"],
"availbility" : 10
}
]
}Given above data map set, design an algorithm to get below output for below given input
I/P =>
{
"checkin" : 176,
"checkout" : 178,
"features" : ["breakfast"]
"rooms" : 1
}o/P =>
[
{
"price" : 250,
"features" : ["breakfast"],
"availbility" : 1
},
{
"price" : 260,
"features" : ["breakfast", "refundable"],
"availbility" : 3
}
]The next round was system design round. Below question was posted to me by two engineers.
Booking.com has close to 1M booking per day. When user makes a reservation in a hotel, he chooses a room and confirms his reservation and they get the CC details. The Payment can happen in two ways, Either Booking.com charges the payment or pass the CC details to hotel partener and let the partner capture the transaction when user uses the hotel. Consider that we have a external system called fred, which gets us the list of fraudulent CC's. Design a system to identify if a reservation was made using a fraudulent CC considerting both the mode of payments
The last round was FIT round to know your commercial awareness by a Senior Manager.