Booking.com Interview Report
- 3of 3 votes
Answers$a = [3, 1, 4, 5, 19, 6];
$b = [14, 9, 22, 36, 8, 0, 64, 25];
# Some elements in the second array are squares.
- Phil September 08, 2015 in Netherland
# Print elements that have a square root existing in the first array.
# $b[1] = 9, it’s square root is 3 ($a[0])
# $b[3] = 36, it’s square root is 6 ($a[5])
# $b[7] = 25, it’s square root is 5 ($a[3])
# Result:
# 9
# 36
# 25| Report Duplicate | Flag | PURGE
Booking.com Software Engineer Algorithm - 2of 2 votes
AnswersThere's a very simple compression algorithm that takes subsequent characters and just emits how often they were seen.
- Phil September 08, 2015 in Netherland
Example:
abababaabbbaaaaa| Report Duplicate | Flag | PURGE
Booking.com Software Engineer Algorithm
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.