servicenow logo
ServiceNow· Software Engineer (IC2)

ServiceNow IC2 – Interview Experience R1

Posted
5 Jun 2025
348 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.

How it went

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.

Questions asked (11)

  1. 01

    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]

  2. 02

    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

  3. 03

    JavaScript Promises

    Other

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

  4. 04

    JavaScript Callbacks

    Other

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

  5. 05

    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.

  6. 06

    JavaScript `call`, `apply`, `bind`

    Other

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

  7. 07

    JavaScript Private Variables & Closures

    Other

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

  8. 08

    JavaScript IIFE

    Other

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

  9. 09

    JavaScript Hoisting

    Other

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

  10. 10

    JavaScript Synchronous vs. Asynchronous

    Other

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

  11. 11

    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.

How they prepared

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

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!