ServiceNow IC2 – Interview Experience R1

servicenow logo
servicenow
Software Engineer (IC2)
June 5, 20253 reads

Summary

I interviewed for a Software Engineer (IC2) position at ServiceNow, completing a technical round that covered DSA, JavaScript, React, and CS fundamentals. I successfully presented optimal solutions for coding problems and provided detailed explanations for conceptual questions.

Full Experience

Interview experience for Round 1 (R1) – ServiceNow IC2 position

Position: Software Engineer (IC2) Company: ServiceNow Round: R1 – Technical Coding + Concepts Background: I currently work as a Machine Learning Quality Engineer, prepping for a software engineer transition.


Round Format

  • Live online technical round
  • Topics: DSA, JavaScript, React, CS fundamentals
  • Coding on a shared editor (JavaScript)

Questions & My Approach

1. Next Greater Element to the Right

  • Question: Given an array, print for each element its next greater element to the right (or -1 if none exists). Example: [11, 13, 21, 3][13, 21, -1, -1]

  • My Approach:

    • Explained both brute-force (O(n²)) and optimal stack (O(n)) solutions.
    • Implemented the monotonic stack solution in JavaScript—clean, commented, CP-style.
    • Discussed edge cases like decreasing sequences and duplicates.
    • Provided reasoning and time/space complexity.

2. First Missing Positive Integer

  • Question: Given an unsorted array, find the smallest missing positive integer starting from 1, in O(n) time and O(1) space. Example: [2, 3, -7, 6, 8, 1, -10, 15]4

  • My Approach:

    • Described classic O(n) in-place hashing (index marking) approach.
    • Walked through a dry run, showed how negatives and out-of-bounds numbers are handled.
    • Wrote JS function signatures and code.
    • Highlighted edge cases (no 1 present, fully continuous arrays, all negatives).
    • Explained why this approach meets O(n)/O(1) requirements.

3. JavaScript & React Concepts

  • Promises:

    • Explained promise states (pending/fulfilled/rejected), usage, chaining, and async/await.
  • Callbacks:

    • Discussed as arguments for async ops, in React (event handlers, child-to-parent comm), and array methods.
  • useEffect & useMemo:

    • Gave clear definitions, syntax, use cases, and sample code.
    • Explained when and why to use each for performance and side effects.

4. JS Fundamentals

  • call, apply, bind:

    • Compared usage, argument passing, and context binding.
  • Private Variables/Closures:

    • Demonstrated classic closure and ES6+ class fields.
  • IIFE:

    • Explained syntax, use cases for local scope/data privacy.
  • Hoisting:

    • Clarified what’s hoisted, difference between var/let/const, TDZ.
  • Synchronous vs. Asynchronous:

    • Explained default JS sync nature, async via event loop/callbacks/promises.

5. Closure Coding Challenge

  • Task: Implement a closure-based counter so each call returns the next increment.

  • Solution:

    • Wrote a factory function returning an inner function that remembers a private counter.

How I Approached the Round

  • Explained my thinking before coding, highlighted time/space tradeoffs.
  • Used CP-style variable names and code structure.
  • Gave edge cases, reasoning, and small dry runs for clarity.
  • Related answers back to real ServiceNow product scenarios (edge-case bugs, async APIs, UI interactions).

Overall Impression

  • Questions were practical, relevant, and tested core understanding.
  • Clear communication and explaining the "why" as well as the "how" was appreciated.
  • Prepping with LeetCode, React core, and real-world debugging scenarios helped a lot.

Interview Questions (11)

Q1
Next Greater Element to the Right
Data Structures & Algorithms

Given an array, print for each element its next greater element to the right (or -1 if none exists). Example: [11, 13, 21, 3][13, 21, -1, -1]

Q2
First Missing Positive Integer
Data Structures & Algorithms

Given an unsorted array, find the smallest missing positive integer starting from 1, in O(n) time and O(1) space. Example: [2, 3, -7, 6, 8, 1, -10, 15]4

Q3
JavaScript Promises
Other

Explain Promise states (pending/fulfilled/rejected), usage, chaining, and async/await.

Q4
JavaScript Callbacks
Other

Discuss callbacks as arguments for async ops, in React (event handlers, child-to-parent comm), and array methods.

Q5
React useEffect & useMemo
Other

Give clear definitions, syntax, use cases, and sample code for useEffect and useMemo. Explain when and why to use each for performance and side effects.

Q6
JavaScript `call`, `apply`, `bind`
Other

Compare usage, argument passing, and context binding for call, apply, and bind.

Q7
JavaScript Private Variables & Closures
Other

Demonstrate classic closure and ES6+ class fields for private variables.

Q8
JavaScript IIFE
Other

Explain IIFE syntax, use cases for local scope/data privacy.

Q9
JavaScript Hoisting
Other

Clarify what’s hoisted, difference between var/let/const, TDZ.

Q10
JavaScript Synchronous vs. Asynchronous
Other

Explain default JS sync nature, async via event loop/callbacks/promises.

Q11
Closure-based Counter
Data Structures & Algorithms

Implement a closure-based counter so each call returns the next increment. Task: Implement a closure-based counter so each call returns the next increment.

Preparation Tips

Prepping with LeetCode, React core, and real-world debugging scenarios helped a lot.

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!