Round 1
Questions: You are working on an Amazon Data Center you are required to reduce the amount of main memory consumption by the processes.
Given a list of processes where each value represents memory consumption by the process and given one variable m representing the number of processes to be removed. We need to delete m number of processes from the list in a contiguous manner and return the minimum amount of main memory used by all the processes running after deleting the contiguous segment of processes.
Example - processes = {10, 4, 8, 13, 20}, m = 2;
output = 22 [removing 13 and 20 as they are consuming large memory]
Constraints:
1 < N < 1000000000 // size of the array
1 < m < 100000 // contiguous segment of the array.
1 < process[i] < 1000000000
For detailed explanations with code, visit: Amazon SDE 1 Online Assessment Question
Candidate's Approach
No approach provided.
Interviewer's Feedback
No feedback provided.