Nutanix OA | MTS II - Python Automation Testing

nutanix logo
nutanix
MTS II - Python Automation Testing
September 24, 202512 reads

Summary

I recently completed the Online Assessment (OA) for the MTS II - Python Automation Testing role at Nutanix. The assessment featured a dynamic programming problem that required optimal task scheduling on two types of servers to minimize cost.

Full Experience

I participated in the Online Assessment for the MTS II - Python Automation Testing position at Nutanix. The OA was conducted on the Hackerrank platform. I was presented with a problem that involved Data Engineers needing to schedule long-running tasks on remote servers in a cost-effective manner. The challenge was to utilize both a paid server, which had variable costs and processing times for each task, and a free server, which processed tasks in a fixed time unit but only when the paid server was occupied. My goal was to determine the minimum total cost to complete all tasks by scheduling them optimally. The problem statement was quite detailed, providing an example and specific constraints to guide the solution.

Interview Questions (1)

Q1
Minimum Cost to Schedule Tasks on Two Servers
Data Structures & AlgorithmsHard

Problem Statement:

Data Engineers in Leetcode need to schedule long-running tasks on remote servers cost-effectively.

They have access to two servers:

  1. A paid server that requires cost[i] units to process task i
  2. A free server that processes any task in exactly 1 time unit, but can only be used when the paid server is occupied

Each task i requires time 'i' units to complete on the paid server.

Determine the minimum total cost to complete all tasks by scheduling them optimally.

Example:

Suppose n = 4, cost = [1, 1, 3, 4] and time = [3, 1, 2, 3]

  • The first task must be scheduled on the paid server for a cost of 1 and it takes 3 units of time to complete. In the meantime, the other three tasks are executed on the free server for no cost as the free server takes only 1 unit to complete any task. Return the total cost.

Function Description:

  • int cost[n]: the costs of scheduling the tasks on a remote server
  • int time[n]: the times taken to run the tasks on a remote server

Return:

  • int: the minimum cost to complete all the tasks

Constraints:

  • 1 ≤ n ≤ 10^3
  • 1 ≤ cost[i] ≤ 10^6
  • 1 ≤ time[i] ≤ 10^3
Discussion (0)

Share your thoughts and ask questions

Join the Discussion

Sign in with Google to share your thoughts and ask questions

No comments yet

Be the first to share your thoughts and start the discussion!