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

SDE - Intern

ServiceNow
upvote
share-icon
3 rounds | 5 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 3 months
Topics: Data Structures, Pointers, OOPS, System Design, Algorithms, Dynamic Programming
Tip
Tip

Tip 1 : Focus on graphs every interviewer ask at least one graph question
Tip 2 : Read about amazon leadership principles and STAR
Tip 3 : Make 2-3 good personal projects, interviewers ask about questions about personal projects.

Application process
Where: Campus
Eligibility: No criteria
Resume Tip
Resume tip

Tip 1 : Make 2-3 good personal projects, interviewers ask about questions about personal projects.
Tip 2 : Make a single page resume

Interview rounds

01
Round
Medium
Video Call
Duration60 minutes
Interview date17 Aug 2022
Coding problem2

- Morning time
- Environment was good.
- No
- Interviewer was good

1. Reach the last cell in the least time

Moderate
15m average time
85% success
0/80
Asked in companies
AmazonVisaCIS - Cyber Infrastructure

You are given an ‘N x N’ matrix ‘GRID’. Initially, every cell is locked, and ‘GRID[i][j]’ represents the time at which the cell at ‘(i, j)’ will unlock. You can move from one cell to another 4-dimensionally adjacent cell if and only if both cells are unlocked. You can move through infinite cells in zero time. Also, you cannot leave the boundaries of the grid.

If you start at the cell ‘(0, 0)’, what is the least time required to reach the last cell ‘(N - 1, N - 1)’.

Example:
‘GRID’ =

example

We cannot reach the cell ‘(2, 2)’ until the time is ‘5’. When the time is ‘5’, we move along the path: 
0 -> 1 -> 4 -> 3 -> 5

The cell with value ‘1’ will be unlocked when the time is ‘1’.
At time = 1: 0 -> 1

Similarly, the cell with value ‘4’ is unlocked when the time is ‘4’. At that time the cell with value ‘3’ will also be unlocked, as it unlocks at time ‘3’.    
At time = 4: 0 -> 1 -> 4 -> 3

The cell with value ‘5’ will be unlocked when the time is ‘5’.
At time = 5: 0 -> 1 -> 4 -> 3 -> 5

So, the least time to reach cell ‘(2, 2)’ is ‘5’.
Note:
1. All elements in the ‘GRID’ are unique.

2. ‘GRID[i][j]’ is a permutation of [0, 1, … , (N ^ 2) - 1].
Problem approach

s1- came up with the O(nˆ2) 
s2- approach initially then optimised it using DP and did it in O(n)

Try solving now

2. Kth Smallest and Largest Element of Array

Easy
15m average time
70% success
0/40
Asked in companies
HSBCSalesforceSprinklr

You are given an array ‘Arr’ consisting of ‘N’ distinct integers and a positive integer ‘K’. Find out Kth smallest and Kth largest element of the array. It is guaranteed that K is not greater than the size of the array.

Example:

Let ‘N’ = 4,  ‘Arr’ be [1, 2, 5, 4] and ‘K’ = 3.  
then the elements of this array in ascending order is [1, 2, 4, 5].  Clearly, the 3rd smallest and largest element of this array is 4 and 2 respectively.
Problem approach

s1 - elements of this array in ascending order is [1, 2, 4, 5]
s2 - Kth largest element, 1 <= T <= 50
s3 - compare the element and print for the smallest one

Try solving now
02
Round
Medium
Face to Face
Duration30 minutes
Interview date22 Sep 2022
Coding problem2

- Morning time
- Environment was good.
- No
- Interviewer was good

1. Data Structure Supporting Insert Delete And GetRandom

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

Design and implement a data structure which supports the following operations:

insert(X): Inserts an element X in the data structure and returns true if the element was not present, and false otherwise.

remove(X): Removes the element X from the data structure, if present. Returns true if the element was present and false otherwise.

search(X): Search the element X in the data structure. Returns true if the element was present and false otherwise.

getRandom(): Return a random element present in the data structure.

Four types of queries denote these operations:

Type 1: for insert(X) operation.
Type 2: for remove(X) operation.
Type 3: for search(X) operation.
Type 4: for getRandom() operation.
Note:
It is guaranteed that at least one element will be present in the data structure when getRandom() operation is performed.
Follow Up:
Can you implement every operation such that it works in O(1) time?
Problem approach

s1 - Apply CURD operation
s2 - Apply element X in the data structure and returns true if the element was not present, and false otherwise.
s3 - Check for getRandom() operation.,at least one element will be present in the data structure.

Try solving now

2. Maximum Points On Straight Line

Hard
10m average time
90% success
0/120
Asked in companies
MicrosoftUberAdobe

You are given a 2-D plane, and some 'N' integer coordinates in the form of (X, Y), where 'X' is the x-coordinate and 'Y' is the y-coordinate, all of which lie on that plane. You need to find the maximum number of coordinates among these which can form a straight line.

Note:
1. All the coordinates are integer coordinates.
2. There can be two identical coordinates.
Try solving now
03
Round
Medium
HR Round
Duration30 minutes
Interview date15 Sep 2022
Coding problem1

- Morning time
- Environment was good.
- No
- Interviewer was good

1. Basic HR Questions

1. Why did you decide to apply to this role?
2. What experience do you have that would be relevant to this role?
3. Tell me about your experience in.
4. What did you like most about the job description?
5. Why are you leaving your current job? 
6. Tell me about this gap in your resume.

Problem approach

Tip 1 : Keep your communication good
Tip 2 : Drees well and practice mock
Tip 3 : Be confident while speaking

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
1 rounds | 2 problems
Interviewed by ServiceNow
1264 views
0 comments
0 upvotes
Software Engineer
3 rounds | 7 problems
Interviewed by ServiceNow
2839 views
0 comments
0 upvotes
SDE - 2
3 rounds | 3 problems
Interviewed by ServiceNow
156 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 - Intern
3 rounds | 6 problems
Interviewed by Amazon
15481 views
4 comments
0 upvotes
company logo
SDE - Intern
4 rounds | 7 problems
Interviewed by Microsoft
15339 views
1 comments
0 upvotes
company logo
SDE - Intern
2 rounds | 4 problems
Interviewed by Amazon
10142 views
2 comments
0 upvotes