servicenow logo
ServiceNow路 Senior Software Engineer

SSE @ ServiceNow

Posted
3 Apr 2025
336 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.

How it went

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

Questions asked (4)

  1. 01

    Search in Row-Column Sorted 2D Matrix

    Data Structures & Algorithms

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

  2. 02

    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)]

  3. 03

    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.

    Open the problem
  4. 04

    Low-Level Design of BookMyShow

    System Design

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

Know someone preparing? Send it to them:WhatsAppLinkedInX

Interviewed at ServiceNow recently?

Write up your rounds while you still remember the questions. It helps the next person more than you would think.

Share your experience
Discussion 0

Questions for the author, or how your own interview compared.

Join the discussion

Sign in with Google to comment or ask the author a question.

No comments yet

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