Nutanix Hacker rank assesment
Anonymous User
562

Gave a OA of nutanix (IC4/5 role)
List of question asked in 2 hour:

  1. 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

  1. 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)

  2. 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

Comments (3)