I received an invitation to participate in the ServiceNow Women Tech Hiring Challenge and registered.
Round 1: Assessment on HackerRank Two coding questions were presented. I only remember one:
Question: Two new shops are opening inside a new building in Hackerland, and k kinds of items are needed to stock cells at each store. Given the prices of the items in two shops, choose exactly k indices in such a way that the minimum sum of arrays for the first shop and the second shop over these indices is maximum.
Example 1: N=5 k=3 firstShop = [6, 3, 6, 5, 1] secondShop = [1, 4, 5, 9, 2]
Choosing subset 0, 2, 3 The value is minimum(firstShop sum of those indices, secondShop sum of those indices) min(6+6+5, 1+5+9), min(17, 15) = 15, which is the maximum possible
Example 2: int n = 3, k = 1; firstShop = {10, 2, 4}; secondShop = {1, 9, 6};
Choosing subset 2 min(4, 6) = 4 which is the maximum possible
In both questions, 3/4 of my test cases passed.
Despite this, I received a call for interviews. The interviewer said I was not shortlisted, but asked if I wanted to continue with the interview process. I agreed, and there were two rounds: DSA and HM.
Round 2: DSA The interviewer asked about my current role and then presented two coding questions:
a. Input: 12:14 am midnight(22nd ), 11 pm(22nd ), 12:00 am(22nd), 12:40 am(22nd), ..... K = 15 mins
Output: true, true, false, true...
The input represents flight landing times, and I needed to return a boolean array indicating whether the time difference between the current and previous landed flight is greater than K. If it is, return true; otherwise, return false.
b. Input: Checkin and Checkout array[dates of checkin and checkout by the user] of the same size, and k which was the number of Cottages given. I had to return a boolean value indicating whether all the bookings are possible with the given k. Only one booking is possible in a single cottage at a time, from the checkin date till the checkout date inclusive.
Input: checkin 1 3 4 5 checkout 2 8 11 8 and K = 2 Output: false
The interviewer was friendly and the round lasted for about 2 hours.
Round 3: HM The interviewer asked me to list all the APIs needed to create a Udemy-like application. He then moved on to coding questions and asked me to implement producer-consumer code, which I couldn't recall. I admitted I didn't know it. He then asked me to implement a stack using queues, which I did successfully. He seemed satisfied.
Verdict: Rejected