Summary
I encountered a challenging server load balancing problem during my online assessment for Ethos Life. The problem required careful consideration of manual offloading and an automated management tool to minimize operations.
Full Experience
During my online assessment with Ethos Life, I was presented with a complex algorithmic problem related to server load balancing. The task was to minimize the number of times a specific management tool was used, given that I could also manually offload tasks from a limited number of servers. This problem required a strategic approach to combine both methods efficiently.
Interview Questions (1)
Problem Statement
You are given a set of servers, each with a different workload represented as an integer in an array serverLoad. The goal is to balance the server workloads by offloading tasks.
You can offload tasks in two ways:
- Manually Offloading – You can manually offload tasks from at most
kservers. - Using the Management Tool – This tool:
- Identifies the server with the highest workload, denoted as
L. - Offloads tasks from all servers with a workload strictly greater than
L/2in a single operation. - Each time you use the tool, it incurs a resource cost.
- Identifies the server with the highest workload, denoted as
Your task is to minimize the number of times the tool is used while ensuring the workloads are balanced. Return the minimum number of times the tool must be operated.
Example
Input:
serverLoad = [16, 12, 18, 10, 12]
k = 2
Output:
1
Summary
I interviewed at Ethos Life for an SDE 2 position, going through an OA, two coding rounds, and a system design round. Unfortunately, I received a rejection.
Full Experience
I recently interviewed at Ethos Life for an SDE 2 role, bringing 4+ years of experience. The interview process consisted of four rounds.
Round 1: Online Assessment (OA)
This round was conducted on the Hackerrank portal. I don't recall the exact questions, but the first one was fairly easy. The second question involved Tree + Graph concepts, which I wasn't able to solve completely.Round 2: Coding
In this round, I was given a problem concerning patient medicine prescriptions. The task was to find the maximum number of concurrent medicines a patient would be taking on any given day. An example was provided:MedicineId | Start Day | End Day 1 | 1 | 4 2 | 2 | 6 3 | 7 | 8 4 | 3 | 9For this example, the answer was 3.
Round 3: Coding
This round focused on the classic LeetCode problem, "Rotten Oranges."Round 4: System Design
The final round was a system design interview where I was asked to design a "Unique Sequence ID Generator."After completing all rounds, the verdict was a rejection.
Interview Questions (3)
For a particular patient, medicine prescriptions are given, each with a start day and an end day. The task is to find the maximum number of medicines the patient would be taking concurrently on any given day.
Example:
MedicineId | Start Day | End Day
1 | 1 | 4
2 | 2 | 6
3 | 7 | 8
4 | 3 | 9
The expected answer for this example was 3.
A classic coding problem, often found on platforms like LeetCode, known as Rotten Oranges.
Design a system capable of generating unique sequence IDs.