SSE @ ServiceNow
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
- Coding: Search for a value on a row and column sorted 2d matrix.
- Short discussion on a past project.
- 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
- 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
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. - Last few mins discussion on LLD of BookMyShow for movies in India.
Verdict
RejectedInterview Questions (4)
Search for a value on a row and column sorted 2d matrix.
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)]
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.
Low-level design discussion for BookMyShow for movies in India.