ServiceNow ASE Role Interview Experience

servicenow logo
servicenow
Associate Software EngineerOngoing
November 16, 20242 reads

Summary

I experienced a four-round interview process for the Associate Software Engineer role at ServiceNow. The process included an online test with DSA and SQL, two technical rounds focusing on DSA, OOPS, and puzzles, and a final technical-managerial discussion.

Full Experience

My interview journey at ServiceNow for the Associate Software Engineer role comprised four distinct rounds: an Online Test, two Technical Rounds, and a final Technical + Manager Round.

Round 1: Online Test on HackerRank (2 DSA + 1 SQL)

This round was conducted on HackerRank with a time limit of 105 minutes. It included two Data Structures & Algorithms (DSA) questions and one SQL question. I was informed that those who solved all three questions received interview invitations.

Round 2: Technical Interview 1

This round was exclusively focused on DSA and a discussion of my resume. For the first 15 minutes, we discussed projects mentioned on my resume. The interviewer asked basic questions about problem statements, definitions of libraries and tech stacks used, and real-life applications of my projects. The DSA question asked was LeetCode 572. Subtree of Another Tree, where I was expected to present different approaches along with their time and space complexities, from brute force to optimal solutions.

Round 3: Technical Interview 2

This round primarily focused on easy Data Structures and Algorithms (DSA), Object-Oriented Programming (OOPs) concepts, and Puzzles. I faced multiple DSA questions and then some OOPs theory. Towards the end, the interviewer presented two puzzles; I managed to solve one, but the other posed a greater challenge.

Round 4: Technical + Managerial Interview

This final round combined a brief description of my projects and past experiences with a managerial evaluation. In the technical discussion, I was asked the reasons behind choosing each project and selecting specific libraries and frameworks. For the managerial discussion, questions revolved around how I take inputs from managers, where I envision myself in the next 5 years, and my interests in tech and hobbies.

Interview Questions (8)

Q1
Maximum Sum of Mountain Elements of Size 3
Data Structures & AlgorithmsEasy

Given an array of integers in any order, return the maximum of a+b+c where a, b, c are subsequences in the array, and a < b > c.

Q2
Number of Arrays with Specific Cost
Data Structures & AlgorithmsMedium

Given an array of integers, its totalCost is calculated as follows, where n = the number of elements in the array and the array itself is named element.

currentMaximumElement = element[0]
totalCost = 0
for ( i = 1; i < n; i += 1){
if (element[i]>currentMaximumElement){
currentMaximumElement=element[i]
totalCost+=1
}
}
Given three values, n, m, and totalCost, find the number of distinct arrays that meet the following criteria:
Each array consists of n integers.
1 <= value at index i in each array <= m, where 0 <= i < n.
The cost to find the maximum element of each array is equal to totalCost.

Two arrays are said to be distinct if there exists at least one index i (where 0 <= i < n) such that the elements at index i are not equal.
For example, given values n=4, m=4, and totalCost=2. With totalCost=2 increases in maximum value from the initial value at element 0 and n=4 elements, each element is between 1 and m=4 inclusive. There are 30 such arrays:
[1,1,2,3], [1,2,1,3], [1,2,3,1],[1,2,2,3], [1,2,3,2],[1,2,3,3],[1,1,2,4], [1,2,1,4], [1,2,4,1],[1,2,2,4], [1,2,4,2],[1,2,4,4],[1,1,3,4], [1,3,1,4], [1,3,4,1],[1,3,3,4], [1,3,4,3],[1,3,4,4],[2,2,3,4], [2,3,4], [2,3,4,2],[2,3,3,4], [2,3,4,3],[2,3,4,4],[2,1,2,3], [2,1,2,4], [2,1,3,4],[2,3,1,4],[2,3,2,4], [2,3,4,1]

Complete the Function
	vector arraysCount(vector n,vector m, vector totalCost){

}</code></pre>Function Description:<br>The function must return an array of integers where each answer[i] equals the number of arrays that meet the criteria for the query, modulo 10^9 +7.<br>Sample Input/Output:<br>The arrays are n=[2, 3, 4], m= [3, 3, 3], and totalCost=[1, 2, 2]. Let the return array be answers, then:<br>answers[0] describes the value arraysCount(n[0] =2, m[0]=3, totalCost[0] = 1) i.e., the total number distinct of arrays such that<br>Each array consists of 2 elements<br>1 <= value at each index i in each array <= 3, where 0 <= i < 2<br>The cost of finding the maximum element of each array = 1<br>The following three arrays meet the criteria:<br>[1,2]<br>[1,3]<br>[2,3]<br>Answer for this query is 3.<br>Similarly the answers array has to be [3,1,6].<br>Constraints:<br>1 < q <= 50<br>1 <= n[i] <= 50, where 0 <= i < q<br>1 <= m[i] <= 100, where 0 <= i < q<br>0 <= totalCost[i] < n[i]. Where 0 <= i < q
Q3
Vaccination Dose Timing Percentage
Other

A vaccine is administered in two doses. It is best if the doses are given between 48 and 72 days apart inclusive. Write a SQL query to return the percentage of beneficiaries who received both doses within the recommended time period, rounded to the nearest integer. Table doses: Dose_id, Beneficiary_id, dose_type, vaccination_date.

Q4
Subtree of Another Tree
Data Structures & Algorithms

LeetCode 572. Subtree of Another Tree. I was asked to discuss different approaches along with their time and space complexities, from brute force to optimal solutions.

Q5
Print Matrix in Spiral Order
Data Structures & Algorithms

Print the elements of a given matrix in spiral order.

Q6
3Sum
Data Structures & Algorithms

The problem was to find all unique triplets in an array which sum to zero (e.g., LeetCode 15. 3Sum). I was asked to provide the optimal approach.

Q7
Characteristics of OOPS
Other

I was asked to discuss the fundamental characteristics of Object-Oriented Programming (OOPs).

Q8
Abstract Class vs. Interface
Other

I had to explain the key differences between an Abstract class and an Interface in OOPs.

Discussion (0)

Share your thoughts and ask questions

Join the Discussion

Sign in with Google to share your thoughts and ask questions

No comments yet

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