ServiceNow | IC2 | Hydrebad | Jan 2025
Summary
I recently had an interview at ServiceNow for an IC2 role in Hyderabad after receiving a referral. The process involved three rounds focusing on Data Structures & Algorithms, High-Level Design, and a Hiring Manager discussion, ultimately resulting in an offer.
Full Experience
Round 1: Focus on DSA
The first round concentrated on Data Structures and Algorithms.
- I was asked to find the Next Greater Element (NGE) for every element in a given array.
- There was another medium-level problem that involved typical DSA concepts, but I don't recall the exact question.
- A problem was presented involving trains at a railway station with varying arrival times, some cancelled or delayed. The interviewer asked which data structure would be most suitable for solving this and why.
- Finally, I was asked for my approach to solving the Coin Change problem.
Round 2: DSA + HLD
The second round combined DSA with High-Level Design.
- One question involved reconstructing a normal Binary Search Tree (BST) given its postorder traversal.
- I was also given a High-Level Design problem related to Swiggy, where they wanted to assess my understanding of HLD and its practical application.
Round 3: Hiring Manager
The final round was with the Hiring Manager.
- I was asked to design a database for a hotel booking system, specifically mentioning OYO DB Design.
- Additionally, I had to provide an efficient approach to solve the classic Stock Buy and Sell Problem.
I am pleased to share that I was selected for the role.
Interview Questions (7)
Next Greater Element
Given an array, find the Next Greater Element (NGE) for every element in it. The Next Greater Element for an element x is the first greater element on the right side of x in the array. If no such element exists, consider it -1.
Train Scheduling Data Structure
I encountered a problem involving trains at a railway station with varying arrival times, some cancelled or delayed. I was asked to identify the most suitable data structure for solving this problem and provide justification.
Coin Change Problem
I was asked to describe the approach to solving the classic Coin Change problem, which involves finding the minimum number of coins needed to make a certain amount, given a set of coin denominations.
Convert Postorder Traversal to BST
Given a postorder traversal sequence of a Binary Search Tree (BST), reconstruct the original BST from it.
Swiggy HLD Problem
I was presented with a High-Level Design (HLD) problem related to Swiggy, designed to test my understanding of HLD principles and their application in a practical scenario.
OYO Database Design
I was tasked with designing a database for a hotel booking system, similar to OYO.
Stock Buy and Sell Problem
I was asked to provide an efficient approach to solve the classic Stock Buy and Sell problem, where the goal is to maximize profit by buying and selling stocks over a period.