Round 1: Online Assessment in Hackerrank
Round 2: LLD
Consider there are differnt types of alexa devices available. One with audio, one with screen, one with audio and screen. These devices may have a battery or may not. Battery devices will have battery percentage. Both battery and non battery devices can be put charging. The task is to show the battery percentage. Include a show methond and that method should show the current battery percentage if it has a battery. If not just say, battery not available. You should also say whether its currently charging or not. There will four statements to print show method like Charging and battery percentage, charging and no battery, just battery percent and no battery.
Round 3: DSA & Problem Solving
You need to find the height of a tree given its parent-child relationship in an array where each index represents a node, and the value at that index represents its parent. The root node has a value of -1.
Input: [4, 3, 0, 6, 6, 3, -1, 0]
Output: 4
Customers arrive at different times,
and each customer has a different number of items to scan, which determines how long they take at the checkout counter.
The store has only one checkout counter, meaning it can serve only one customer at a time.
The checkout system follows these rules:
If no customers are waiting, the counter remains idle.
When the counter is free and multiple customers are waiting, it serves the customer with the fewest items first (shortest checkout time).
If two customers have the same number of items, the one who arrived first is served first.
Once a checkout begins, it must be fully completed before moving to the next customer.
The counter instantly moves to the next available customer once the current checkout finishes.
Input :
You are given an integer n representing the number of customers and a 2D integer array customers, where:
customers[i] = [arrivalTimeᵢ, checkoutDurationᵢ]
Output :
Return an integer array of size n, representing the order in which customers will be served.
Round 4: HM & HLD
Round 5: Bar Raiser (DSA & Problem Solving)
Given two integers n and m, find all the crypto numbers in the range [n, m]. A number is called a crypto number if all adjacent digits have an absolute difference of 1.
Example:
Input: n = 0, m = 15
Output: 0 1 2 3 4 5 6 7 8 9 10 12
Input: n = 20, m = 25
Output: 21 23
https://leetcode.com/problems/max-consecutive-ones-iii/description/
Experience:
Verdict: Selected