ServiceNow coding interview
questions, leaked.
84 problems reported across recent ServiceNow interviews. Top patterns: array, string, dynamic programming. The list below is what most reported candidates actually saw, plus the honest play if you can't grind all of it.
ServiceNow's technical interviews lean heavily on array and string manipulation. You'll face 84 problems across their assessments, with 63 in the medium difficulty band. Arrays dominate the distribution at 49 problems, followed by strings at 25 and dynamic programming at 19. This means you're spending most of your prep time on sliding windows, two-pointer work, and subarray logic. The hard problems test your ability to combine patterns: Trapping Rain Water mixes arrays, two pointers, and stacks. If you hit a wall on any of these hybrid problems during the live assessment, StealthCoder runs invisibly and surfaces a working solution in seconds.
Top problems at ServiceNow
| # | Problem | Diff | Frequency | Pass % | Patterns |
|---|---|---|---|---|---|
| 01 | Trapping Rain Water | HARD | 100.0 | 65% | Array · Two Pointers · Dynamic Programming |
| 02 | Subarray Product Less Than K | MEDIUM | 100.0 | 53% | Array · Binary Search · Sliding Window |
| 03 | Valid Parentheses | EASY | 97.9 | 42% | String · Stack |
| 04 | Group Anagrams | MEDIUM | 97.9 | 71% | Array · Hash Table · String |
| 05 | LRU Cache | MEDIUM | 95.5 | 45% | Hash Table · Linked List · Design |
| 06 | Generate Parentheses | MEDIUM | 93.0 | 77% | String · Dynamic Programming · Backtracking |
| 07 | Lexicographically Smallest String After Operations With Constraint | MEDIUM | 93.0 | 62% | String · Greedy |
| 08 | Find Minimum Diameter After Merging Two Trees | HARD | 93.0 | 57% | Tree · Depth-First Search · Breadth-First Search |
| 09 | Number of Distinct Roll Sequences | HARD | 93.0 | 57% | Dynamic Programming · Memoization |
| 10 | Longest Substring Without Repeating Characters | MEDIUM | 87.0 | 37% | Hash Table · String · Sliding Window |
| 11 | Merge Intervals | MEDIUM | 79.4 | 49% | Array · Sorting |
| 12 | Best Time to Buy and Sell Stock | EASY | 79.4 | 55% | Array · Dynamic Programming |
| 13 | Design HashMap | EASY | 79.4 | 66% | Array · Hash Table · Linked List |
| 14 | Zigzag Conversion | MEDIUM | 79.4 | 52% | String |
| 15 | Move Zeroes | EASY | 79.4 | 63% | Array · Two Pointers |
| 16 | Container With Most Water | MEDIUM | 74.5 | 58% | Array · Two Pointers · Greedy |
| 17 | First Missing Positive | HARD | 74.5 | 41% | Array · Hash Table |
| 18 | Two Sum | EASY | 74.5 | 56% | Array · Hash Table |
| 19 | Maximal Square | MEDIUM | 74.5 | 49% | Array · Dynamic Programming · Matrix |
| 20 | Kth Largest Element in an Array | MEDIUM | 74.5 | 68% | Array · Divide and Conquer · Sorting |
| 21 | Daily Temperatures | MEDIUM | 74.5 | 67% | Array · Stack · Monotonic Stack |
| 22 | Number of Islands | MEDIUM | 68.6 | 62% | Array · Depth-First Search · Breadth-First Search |
| 23 | Search in Rotated Sorted Array | MEDIUM | 68.6 | 43% | Array · Binary Search |
| 24 | Validate Binary Search Tree | MEDIUM | 68.6 | 34% | Tree · Depth-First Search · Binary Search Tree |
| 25 | String Compression | MEDIUM | 68.6 | 58% | Two Pointers · String |
| 26 | LFU Cache | HARD | 68.6 | 47% | Hash Table · Linked List · Design |
| 27 | Reverse Linked List | EASY | 68.6 | 79% | Linked List · Recursion |
| 28 | Maximum Product Subarray | MEDIUM | 68.6 | 35% | Array · Dynamic Programming |
| 29 | Pacific Atlantic Water Flow | MEDIUM | 68.6 | 58% | Array · Depth-First Search · Breadth-First Search |
| 30 | Top K Frequent Words | MEDIUM | 68.6 | 59% | Array · Hash Table · String |
| 31 | Longest Palindromic Substring | MEDIUM | 68.6 | 36% | Two Pointers · String · Dynamic Programming |
| 32 | Median of Two Sorted Arrays | HARD | 68.6 | 44% | Array · Binary Search · Divide and Conquer |
| 33 | Binary Tree Right Side View | MEDIUM | 60.9 | 67% | Tree · Depth-First Search · Breadth-First Search |
| 34 | Meeting Rooms II | MEDIUM | 60.9 | 52% | Array · Two Pointers · Greedy |
| 35 | Number of Distinct Substrings in a String | MEDIUM | 60.9 | 65% | String · Trie · Rolling Hash |
| 36 | Reverse Words in a String II | MEDIUM | 60.9 | 56% | Two Pointers · String |
| 37 | Set Matrix Zeroes | MEDIUM | 60.9 | 61% | Array · Hash Table · Matrix |
| 38 | Longest Consecutive Sequence | MEDIUM | 60.9 | 47% | Array · Hash Table · Union Find |
| 39 | Number of Visible People in a Queue | HARD | 60.9 | 71% | Array · Stack · Monotonic Stack |
| 40 | Asteroid Collision | MEDIUM | 60.9 | 46% | Array · Stack · Simulation |
| 41 | Vowels of All Substrings | MEDIUM | 60.9 | 55% | Math · String · Dynamic Programming |
| 42 | Valid Parenthesis String | MEDIUM | 60.9 | 39% | String · Dynamic Programming · Stack |
| 43 | Validate IP Address | MEDIUM | 60.9 | 28% | String |
| 44 | Maximum Subarray | MEDIUM | 60.9 | 52% | Array · Divide and Conquer · Dynamic Programming |
| 45 | Fraction to Recurring Decimal | MEDIUM | 60.9 | 26% | Hash Table · Math · String |
| 46 | Largest Number | MEDIUM | 60.9 | 41% | Array · String · Greedy |
| 47 | First Unique Character in a String | EASY | 60.9 | 64% | Hash Table · String · Queue |
| 48 | Sum Root to Leaf Numbers | MEDIUM | 60.9 | 69% | Tree · Depth-First Search · Binary Tree |
| 49 | Check if a Parentheses String Can Be Valid | MEDIUM | 50.3 | 45% | String · Stack · Greedy |
| 50 | Number of Distinct Islands | MEDIUM | 50.3 | 62% | Hash Table · Depth-First Search · Breadth-First Search |
Frequencies derived from public community-tagged interview reports. Click a row to view on LeetCode.
You have a week, maybe less. You can't out-grind the list above. StealthCoder runs invisibly during the actual ServiceNow OA. The proctor cannot see it. Screen share cannot detect it. Made for the engineer who has done the work but might still blank with a webcam pointed at him.
Get StealthCoder- array49 · 58%
- string25 · 30%
- dynamic programming19 · 23%
- hash table18 · 21%
- two pointers14 · 17%
- sorting10 · 12%
- breadth first search10 · 12%
- greedy9 · 11%
- stack9 · 11%
- depth first search9 · 11%
The problem set is pattern-heavy, not algorithm-heavy. Arrays and strings make up roughly 60 percent of the workload, so drilling Subarray Product Less Than K, Longest Substring Without Repeating Characters, and Group Anagrams pays immediate dividends. Dynamic programming appears in 19 problems but often as a secondary pattern: it pairs with arrays in Best Time to Buy and Sell Stock or with strings in Generate Parentheses. Two-pointer and sliding-window techniques unlock half your wins. Hash tables show up in 18 problems, mostly for caching and constraint tracking. The hard problems test synthesis: Trapping Rain Water demands you layer array traversal, two pointers, and monotonic stacks. BFS and DFS are lower frequency but non-negotiable for tree and graph variants. StealthCoder becomes your safety net on the synthesis problems where you'd normally need five minutes to unwind the approach.
Companies with similar patterns
If you prepped for ServiceNow, these companies recycle ~60% of the same topics.
You've seen the list.
Now make sure you pass ServiceNow.
Memorizing every problem above in a week is a fantasy. StealthCoder is the hedge: an AI overlay that's invisible during screen share. It reads the problem on screen and surfaces a working solution in under 2 seconds. Made for the engineer who has done the work but might still blank with a webcam pointed at him. Works on HackerRank, CodeSignal, CoderPad, and Karat.
ServiceNow interview FAQ
Should I focus on arrays first for ServiceNow?+
Yes. Arrays account for 49 of 84 problems. Start with sliding-window array problems (Subarray Product Less Than K, Longest Substring Without Repeating Characters) and two-pointer work (Move Zeroes, Merge Intervals). You'll see immediate pattern recognition.
How much dynamic programming do I need?+
Dynamic programming appears in 19 problems but rarely standalone. It's always paired with arrays or strings. Drill it as a secondary technique after mastering array and string fundamentals. Trapping Rain Water and Generate Parentheses are the synthesis cases to understand deeply.
What's the hardest part of ServiceNow's assessment?+
The hard problems (11 total) combine three or four patterns. Trapping Rain Water uses arrays, two pointers, dynamic programming, and stacks together. If you only know one pattern, you'll stall. Hybrid problem fluency matters more than single-technique depth.
Is hash-table design a big focus?+
Hash tables appear in 18 problems, but most are straightforward lookups. LRU Cache and Design HashMap are the design problems worth deep practice. They test your understanding of hash collisions and backing data structures, not just the pattern itself.
How many string problems should I solve?+
25 string problems are on the list, but many overlap with array and hash-table patterns. Prioritize Valid Parentheses, Longest Substring Without Repeating Characters, and Generate Parentheses. You'll see string manipulation paired with sliding windows or backtracking most often.