Nykaa | Rejected

Result
Rejected
Posted
13 Jan 2024
326 reads

Summary

I interviewed with Nykaa and unfortunately, my application was rejected. During the interview, I faced two coding problems, and I provided a solution for one of them.

How it went

I recently had an interview experience with Nykaa. Despite my best efforts, my application was ultimately rejected. The interview process included a technical round where I was given two distinct coding challenges. I focused on providing a clear solution for the second problem, 'Keys and Rooms', and presented my approach and code for it. The first problem involved a scenario of allocating computational resources based on specific rating conditions.

Questions asked (2)

  1. 01

    Minimum Resources for Computation Requests

    Data Structures & Algorithms

    There are n computation requests in a queue to the server. Each request is assigned a rating value given in an integer array ratings.

    The server needs to allocate computational resources to the requests subject to the following conditions:

    • Each request must get at least one computational resource.
    • Requests with higher ratings get more resources than their neighbors.

    Return the minimum number of resources the server needs to allocate to the requests.

    Input: ratings = [1,0,2]
    Output: 5
    Explanation: You can allocate to the first, second and third request with 2, 1, 2 resources respectively.

    Input: ratings = [1,2,2]
    Output: 4
    Explanation: You can allocate to the first, second and third request with 1, 2, 1 resources respectively.
    The third request gets 1 resource because it satisfies the above two conditions.

  2. 02

    Keys and Rooms

    Data Structures & Algorithms · Medium

    There are n rooms labeled from 0 to n - 1 and all the rooms are locked except for room 0. Your goal is to visit all the rooms. However, you cannot enter a locked room without having its key.

    When you visit a room, you may find a set of distinct keys in it. Each key has a number on it, denoting which room it unlocks, and you can take all of them with you to unlock the other rooms.

    Given an array rooms where rooms[i] is the set of keys that you can obtain if you visited room i, return true if you can visit all the rooms, or false otherwise.

    Example 1:

    Input: rooms = [[1],[2],[3],[]]
    Output: true

    Open the problem

Know someone preparing? Send it to them:WhatsAppLinkedInX

Interviewed at Nykaa recently?

Write up your rounds while you still remember the questions. It helps the next person more than you would think.

Share your experience
Discussion 0

Questions for the author, or how your own interview compared.

Join the discussion

Sign in with Google to comment or ask the author a question.

No comments yet

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