ServiceNow interview experience Real time questions & tips from candidates to crack your interview

SDE - 2

ServiceNow
upvote
share-icon
3 rounds | 3 Coding problems

Interview preparation journey

expand-icon
Journey
I was impacted by layoffs from PayPal, and at that time, I had over 3 years of experience. I was revising DSA and System Design; these topics were not new to me, as I had already solved many questions on coding platforms.
Application story
One of my friends works at ServiceNow, so I asked him for a referral and applied through it. I was shortlisted, and the interview was conducted during a hiring drive event.
Why selected/rejected for the role?
I was selected for this role mainly because of my problem-solving skills. I was strong in DSA, and I also prepared some system design concepts, which helped me crack the interviews.
Preparation
Duration: 6 Months
Topics: DSA, OOPs, System Design, HLD, LLD, Behavioral Rounds, Computer Science Fundamentals (OS, DBMS, Computer Networks)
Tip
Tip

Tip 1: Understand the problem statement thoroughly and think from the brute-force approach, gradually optimizing your solution to the most efficient one.

Tip 2: Identify potential edge cases before coding your solution.

Tip 3: Aim for your code to run correctly on the first attempt, without any syntax errors or failing test cases.

Application process
Where: Other
Eligibility: 7 CGPA, (Salary Package - 24 LPA)
Resume Tip
Resume tip

Tip 1: Make your resume ATS-compatible.
Tip 2: Keep it short and limited to one page.

Interview rounds

01
Round
Easy
Online Coding Interview
Duration60 minutes
Interview date27 Jul 2023
Coding problem1

They asked a question on trees and expected me to write working code for it.

1. Transformer Voltage Stability

Moderate
0/80
Asked in company
ServiceNow

You are given an n-ary tree representing a network of transformers. Each node in the tree is a transformer with a specific integer voltage value.

The entire network is considered stable if and only if every transformer in the network adheres to a strict stability rule. The rule is as follows:

For any given transformer (node), the average voltage of all its descendants must be strictly less than the voltage of the transformer itself.

Your task is to determine if the given transformer network is stable.


Problem approach

I used a simple DFS approach to solve the question.

Try solving now
02
Round
Easy
Face to Face
Duration60 minutes
Interview date27 Jul 2023
Coding problem1

They asked questions based on my resume and a simple DSA problem to solve.

 

1. Find Peak Element

Easy
15m average time
85% success
0/40
Asked in companies
GrabDunzoHike

You are given an array 'arr' of length 'n'. Find the index(0-based) of a peak element in the array. If there are multiple peak numbers, return the index of any peak number.


Peak element is defined as that element that is greater than both of its neighbors. If 'arr[i]' is the peak element, 'arr[i - 1]' < 'arr[i]' and 'arr[i + 1]' < 'arr[i]'.


Assume 'arr[-1]' and 'arr[n]' as negative infinity.


Note:
1.  There are no 2 adjacent elements having same value (as mentioned in the constraints).
2.  Do not print anything, just return the index of the peak element (0 - indexed).
3. 'True'/'False' will be printed depending on whether your answer is correct or not.


Example:

Input: 'arr' = [1, 8, 1, 5, 3]

Output: 3

Explanation: There are two possible answers. Both 8 and 5 are peak elements, so the correct answers are their positions, 1 and 3.


Problem approach

// C++ program to find a peak element in the given array
// Using Binary Search

#include 
#include 
using namespace std;

int peakElement(vector &arr) {
int n = arr.size();

// If there is only one element, then it's a peak
if (n == 1) 
return 0;

// Check if the first element is a peak
if (arr[0] > arr[1])
return 0;

// Check if the last element is a peak
if (arr[n - 1] > arr[n - 2])
return n - 1;

// Search Space for binary Search
int lo = 1, hi = n - 2;

while(lo <= hi) {
int mid = lo + (hi - lo)/2;

// If the element at mid is a 
// peak element return mid
if(arr[mid] > arr[mid - 1] 
&& arr[mid] > arr[mid + 1])
return mid;

// If next neighbor is greater, then peak
// element will exist in the right subarray
if(arr[mid] < arr[mid + 1])
lo = mid + 1;

// Otherwise, it will exist in left subarray
else
hi = mid - 1;
}

return 0;
}

int main() {
vector arr = {1, 2, 4, 5, 7, 8, 3};
cout << peakElement(arr);
return 0;
}

Try solving now
03
Round
Easy
Face to Face
Duration60 minutes
Interview date27 Jul 2023
Coding problem1

It was a managerial discussion, mostly focused on behavioural questions.

1. Puzzle

All the questions asked were behavioural. They inquired about my past work experiences and asked situational behavioural questions, such as when I last had to put in extra effort to deliver something to a customer. They also asked about my strengths and weaknesses, followed by a general discussion about the current team, the project, and my expected role and responsibilities.

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

What is recursion?

Choose another skill to practice
Similar interview experiences
SDE - Intern
3 rounds | 5 problems
Interviewed by ServiceNow
1514 views
0 comments
0 upvotes
company logo
SDE - Intern
1 rounds | 3 problems
Interviewed by Amazon
3320 views
0 comments
0 upvotes
Software Engineer
3 rounds | 7 problems
Interviewed by ServiceNow
2839 views
0 comments
0 upvotes
SDE - 1
2 rounds | 2 problems
Interviewed by ServiceNow
305 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 2
5 rounds | 12 problems
Interviewed by Walmart
29570 views
8 comments
0 upvotes
company logo
SDE - 2
3 rounds | 5 problems
Interviewed by Amazon
6677 views
1 comments
0 upvotes
company logo
SDE - 2
6 rounds | 8 problems
Interviewed by Amazon
5176 views
0 comments
0 upvotes