Screening Round: Only DSA
Q1: There are n people standing in a queue, numbered from 1 to n.
The i-th person wants to withdraw a certain amount of money. In a single transaction, the ATM allows a maximum withdrawal of K units.
If a person still has money remaining after a transaction, they move to the end of the queue. Otherwise, they leave the queue.
Return the order in which the people leave the queue.
Q2. You are given an array of non-negative integers. Split it into three non-empty contiguous subarrays: Left, Middle, and Right.
Let:
L = sum of elements in Left M = sum of elements in Middle R = sum of elements in Right
Count the number of ways to split the array such that:
M ≤ L + R
Return the total number of valid splits modulo 10⁹ + 7.
Onsite R1: DSA
Q1. Count permutations of a string( leetcode vesrion)
Q2. Given an array of integers, minimize the sum of its elements by performing the following operation at most K times:
Select any element from the array. Replace it with ⌊x / 2⌋ (integer division by 2).
Return the minimum possible sum of the array after performing up to K operations.
Onsite R2: DSA - Leetcode Based
Q1. Coin Change II https://leetcode.com/problems/coin-change-ii/description/
Q2. Insert Delete GetRandom O(1) https://leetcode.com/problems/insert-delete-getrandom-o1/description/
HR :
Discussion on my current work Discussion on my projects