ServiceNow IC2 – Interview Experience R1
Anonymous User
1634

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.

Advice:
If you’re prepping for ServiceNow IC2 or similar roles, focus on:

  • Mastering DSA patterns (esp. stacks, hash maps, in-place tricks)
  • Explaining JS/React fundamentals in detail
  • Practicing clear, concise code and justifying your choices

Note: R2 -> Link

Comments (7)