HackerRank OA Questions:
- Given an array of length n, a number k is balanced if there are 2 indices i and j in the array, where arr[i], arr[i+1], ... arr[j] is a permutation of 1, 2, ... k. Return a binary string of length n, where 1 represents if the ith character is balanced.
Ex: [4, 1, 3, 2]. Answer: "1011"
- Given an undirected graph rooted at 0 where each node i is represented by a lower case english alphabet. There are m queries. For each query we have a node_from and node_to, figure out if the characters encountered while travelling from node_from to node_to can be used to form a palindrome
Phone Screen DSA Round:
- There are n riders and 1 car with infinite space. Each rider has a range of number of other riders that they are comfortable with. Ex: ith rider is comfortable with 3 to 5 other riders. If this condition is not met they do not ride in the car. Find out the maximum no of riders that is possible to fit in the car
DSA Round:
LLD Round:
Was given a vague Uber Eats Pricing calculator problem with features like Food items with toppings, size. Other requirements include surge pricing, discounts, BOGO, coupons, and additional discounts for uber one members. I had to discuss with the interviewer to narrow down the requirements and implement it.
HLD Round:
Design a stock price alerting system. The system receives stock prices from an external broker. If the current price of the stock exceeds 5% of the closing price, send a notification. Went into db schema, message queues, at most once notifications and retry mechanisms in case of failures.
For DSA and LLD rounds working code was expected.