Nutanix OA (IC4/IC5)
Gave a OA of nutanix (IC4/5 role)
List of question asked in 2 hour:
Maximum Quantity (Machines + maxPower)
Given power[i] and quantity[i], pick a subset so that sum(power) <= maxPower and sum(quantity) is maximized.
0/1 Knapack but meet in middle is optimal because of constraint
Jump Game VI
https://leetcode.com/problems/jump-game-vi/description/
Solved using DP + monotonic queue (first did with normal loop of
range but TLE happened used queue)
Min Cost to Connect All Points
https://leetcode.com/problems/min-cost-to-connect-all-points/
2D DP after sorting but failed later realised it is MST
Found it tough for 2 hour timeline