[ INFO ]category: Behavioral · Onsite difficulty: hard freq: first seen: 2024-08-24
[HARD][ONSITE]OnsiteSDE IIIRejected
$catproblem.md
Round 1 (Codility Online Test):
There are some recipes (pasta, maggi, pizza, etc.) and an ingredient string is given, "pamstaagagi." You need to find out which recipes can be made using this ingredient string.
Output - [pasta, maggi]
There is a car assembly factory with two parallel lanes making identical parts (A and B). There is a cost X for moving A to B and cost Y for moving B to A. Find the minimum cost to complete all operations. No cost is incurred for moving down the same lane.
Example - A - [1, 6, 2] B - [3, 2, 5], X = 2, Y = 1 Output = 8 = 1 +2 + 2 + 1 + 2
Round 2 (Coding Interview):
There is a sorted array {1,2,2,2,2,3,3,4,4,4}. Find how many times a given element is present in this array. The time complexity should be O(log(n)) in the worst case.
Given an array {1,-1,3,-1,2,9,-8, 6}, return a list of all combinations that sum to zero. Output = [[-1,-1,2],[2,-8,6]]
Round 3 (System Design):
High-level and low-level design for generating tiny URLs.
How does redirection happen from a tiny URL to the actual URL?
What hashing techniques have you used? (Base64, Base62, SHA1, etc.)
What types of load balancers have you used?
Round 4 (System Design):
Given buses and routes, how to map buses to routes to optimize bus usage.
Design a system: If a bus deviates from its route or exceeds the speed limit, an alert should be sent to the system.
Overall, the experience was okay. I learned a few things. It was my first interview in a long time, so I did not clear the fourth round.