SSE @ ServiceNow

servicenow logo
servicenow
Senior Software Engineer
April 3, 20253 reads

Summary

I interviewed for a Senior Software Engineer position at ServiceNow, completing two rounds that included coding, system design, and project discussions. I was ultimately rejected.

Full Experience

Round 1

  1. Coding: Search for a value on a row and column sorted 2d matrix.
  2. Short discussion on a past project.
  3. Discussed approach for the below:
    // Given a log file, each log consists time stamp, user name, message. Output top N users in descending order of total no of words used.
    // Ip: 10.10 John ABC def
    // 10.11 Marie ABC
    // 10.20 Marie Q W E
    // 10.23 John ABC def
    // N = 1
    // M
    

    // Op: [(John, 4)]

    // Also parse log function is given which takes input as log file path, and then returns List of users and their word counts // [(John, 2), (Marie, 1), (John, 2)]

Round 2

  1. Coding:

    Variation of https://leetcode.com/problems/longest-consecutive-sequence, but for prime numbers. Still expected O(n) 🙂
    Length of Longest Consecutive prime Subsequence in unsorted array
    eg: arr[] = {36, 41, 19, 56, 35, 44, 13, 33, 17, 29, 34, 11, 92, 43, 23, 32, 42}
    11, 13, 17, 19, 23, 29 -> 6
    N <= 10^7
    0 <= arr[i] <= 10^7

    • Unique numbers
    • unsorted
    Sieve not allowed due to the space it takes. Expected complexity of the driver algorithm - O(n). I don't really think a solutions exists.

    After some time, he mentioned we can assume we have a method that returns the next prime number for a given prime number in a very efficient way.
  2. Last few mins discussion on LLD of BookMyShow for movies in India.

Verdict

Rejected

Interview Questions (4)

Q1
Search in Row-Column Sorted 2D Matrix
Data Structures & Algorithms

Search for a value on a row and column sorted 2d matrix.

Q2
Top N Users by Word Count in Log File
Data Structures & Algorithms

Given a log file, each log consists time stamp, user name, message. Output top N users in descending order of total no of words used. Ip: 10.10 John ABC def 10.11 Marie ABC 10.20 Marie Q W E 10.23 John ABC def N = 1

Op: [(John, 4)]

Also parse log function is given which takes input as log file path, and then returns List of users and their word counts [(John, 2), (Marie, 1), (John, 2)]

Q3
Longest Consecutive Prime Subsequence
Data Structures & Algorithms

Variation of https://leetcode.com/problems/longest-consecutive-sequence, but for prime numbers. Still expected O(n) 🙂

Length of Longest Consecutive prime Subsequence in unsorted array eg: arr[] = {36, 41, 19, 56, 35, 44, 13, 33, 17, 29, 34, 11, 92, 43, 23, 32, 42} 11, 13, 17, 19, 23, 29 -> 6 N <= 10^7 0 <= arr[i] <= 10^7

  • Unique numbers
  • unsorted

Sieve not allowed due to the space it takes. Expected complexity of the driver algorithm - O(n). I don't really think a solutions exists.

After some time, he mentioned we can assume we have a method that returns the next prime number for a given prime number in a very efficient way.

Q4
Low-Level Design of BookMyShow
System Design

Low-level design discussion for BookMyShow for movies in India.

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!