# Servicenow Coding Interview Questions

> 78 DSA problems asked in Servicenow coding interviews and online assessments, sorted easiest first with hints. Free practice for placements on InternHack.

Canonical: https://www.internhack.in/learn/dsa/companies/servicenow
Last updated: 2026-11-28

78 DSA problems tagged as asked in Servicenow coding interviews and online assessments. Below are all 78: 8 easy, 58 medium and 12 hard. Start with the easy ones, then move to medium. Practise free on InternHack and track your progress.

## Servicenow DSA problems, easiest first

1. [Best Time to Buy and Sell Stock](https://www.internhack.in/learn/dsa/problem/best-time-to-buy-and-sell-stock) (Easy)
2. [Design HashMap](https://www.internhack.in/learn/dsa/problem/design-hashmap) (Easy)
3. [Merge Two Sorted Lists](https://www.internhack.in/learn/dsa/problem/merge-two-sorted-lists) (Easy)
4. [Move Zeroes](https://www.internhack.in/learn/dsa/problem/move-zeroes) (Easy)
5. [Palindrome Linked List](https://www.internhack.in/learn/dsa/problem/palindrome-linked-list) (Easy)
6. [Reverse Linked List](https://www.internhack.in/learn/dsa/problem/reverse-linked-list) (Easy)
7. [Two Sum](https://www.internhack.in/learn/dsa/problem/two-sum) (Easy)
8. [Valid Parentheses](https://www.internhack.in/learn/dsa/problem/valid-parentheses) (Easy)
9. [4Sum](https://www.internhack.in/learn/dsa/problem/4sum) (Medium)
10. [Amount of Time for Binary Tree to Be Infected](https://www.internhack.in/learn/dsa/problem/amount-of-time-for-binary-tree-to-be-infected) (Medium)
11. [Asteroid Collision](https://www.internhack.in/learn/dsa/problem/asteroid-collision) (Medium)
12. [Basic Calculator II](https://www.internhack.in/learn/dsa/problem/basic-calculator-ii) (Medium)
13. [Best Time to Buy and Sell Stock II](https://www.internhack.in/learn/dsa/problem/best-time-to-buy-and-sell-stock-ii) (Medium)
14. [Binary Tree Right Side View](https://www.internhack.in/learn/dsa/problem/binary-tree-right-side-view) (Medium)
15. [Check if a Parentheses String Can Be Valid](https://www.internhack.in/learn/dsa/problem/check-if-a-parentheses-string-can-be-valid) (Medium)
16. [Coin Change](https://www.internhack.in/learn/dsa/problem/coin-change) (Medium)
17. [Combination Sum](https://www.internhack.in/learn/dsa/problem/combination-sum) (Medium)
18. [Container With Most Water](https://www.internhack.in/learn/dsa/problem/container-with-most-water) (Medium)
19. [Daily Temperatures](https://www.internhack.in/learn/dsa/problem/daily-temperatures) (Medium)
20. [Edit Distance](https://www.internhack.in/learn/dsa/problem/edit-distance) (Medium)
21. [Find First and Last Position of Element in Sorted Array](https://www.internhack.in/learn/dsa/problem/find-first-and-last-position-of-element-in-sorted-array) (Medium)
22. [Find Peak Element](https://www.internhack.in/learn/dsa/problem/find-peak-element) (Medium)
23. [Fruit Into Baskets](https://www.internhack.in/learn/dsa/problem/fruit-into-baskets) (Medium)
24. [Gas Station](https://www.internhack.in/learn/dsa/problem/gas-station) (Medium)
25. [Generate Parentheses](https://www.internhack.in/learn/dsa/problem/generate-parentheses) (Medium)
26. [Group Anagrams](https://www.internhack.in/learn/dsa/problem/group-anagrams) (Medium)
27. [House Robber II](https://www.internhack.in/learn/dsa/problem/house-robber-ii) (Medium)
28. [Jump Game II](https://www.internhack.in/learn/dsa/problem/jump-game-ii) (Medium)
29. [Kth Largest Element in an Array](https://www.internhack.in/learn/dsa/problem/kth-largest-element-in-an-array) (Medium)
30. [Largest Number](https://www.internhack.in/learn/dsa/problem/largest-number) (Medium)
31. [Letter Combinations of a Phone Number](https://www.internhack.in/learn/dsa/problem/letter-combinations-of-a-phone-number) (Medium)
32. [Lexicographically Smallest String After Operations With Constraint](https://www.internhack.in/learn/dsa/problem/lexicographically-smallest-string-after-operations-with-constraint) (Medium)
33. [Longest Common Subsequence](https://www.internhack.in/learn/dsa/problem/longest-common-subsequence) (Medium)
34. [Longest Consecutive Sequence](https://www.internhack.in/learn/dsa/problem/longest-consecutive-sequence) (Medium)
35. [Longest Palindromic Substring](https://www.internhack.in/learn/dsa/problem/longest-palindromic-substring) (Medium)
36. [Longest Repeating Character Replacement](https://www.internhack.in/learn/dsa/problem/longest-repeating-character-replacement) (Medium)
37. [Longest Substring Without Repeating Characters](https://www.internhack.in/learn/dsa/problem/longest-substring-without-repeating-characters) (Medium)
38. [LRU Cache](https://www.internhack.in/learn/dsa/problem/lru-cache) (Medium)
39. [Maximal Square](https://www.internhack.in/learn/dsa/problem/maximal-square) (Medium)
40. [Maximum Product Subarray](https://www.internhack.in/learn/dsa/problem/maximum-product-subarray) (Medium)
41. [Maximum Profit From Trading Stocks](https://www.internhack.in/learn/dsa/problem/maximum-profit-from-trading-stocks) (Medium)
42. [Maximum Subarray](https://www.internhack.in/learn/dsa/problem/maximum-subarray) (Medium)
43. [Meeting Rooms II](https://www.internhack.in/learn/dsa/problem/meeting-rooms-ii) (Medium)
44. [Merge Intervals](https://www.internhack.in/learn/dsa/problem/merge-intervals) (Medium)
45. [Minimum Number of Swaps to Make the String Balanced](https://www.internhack.in/learn/dsa/problem/minimum-number-of-swaps-to-make-the-string-balanced) (Medium)
46. [Next Greater Element II](https://www.internhack.in/learn/dsa/problem/next-greater-element-ii) (Medium)
47. [Next Permutation](https://www.internhack.in/learn/dsa/problem/next-permutation) (Medium)
48. [Number of Distinct Islands](https://www.internhack.in/learn/dsa/problem/number-of-distinct-islands) (Medium)
49. [Number of Islands](https://www.internhack.in/learn/dsa/problem/number-of-islands) (Medium)
50. [Pacific Atlantic Water Flow](https://www.internhack.in/learn/dsa/problem/pacific-atlantic-water-flow) (Medium)
51. [Permutations](https://www.internhack.in/learn/dsa/problem/permutations) (Medium)
52. [Pow(x, n)](https://www.internhack.in/learn/dsa/problem/powx-n) (Medium)
53. [Reverse Words in a String II](https://www.internhack.in/learn/dsa/problem/reverse-words-in-a-string-ii) (Medium)
54. [Rotting Oranges](https://www.internhack.in/learn/dsa/problem/rotting-oranges) (Medium)
55. [Set Matrix Zeroes](https://www.internhack.in/learn/dsa/problem/set-matrix-zeroes) (Medium)
56. [Simplify Path](https://www.internhack.in/learn/dsa/problem/simplify-path) (Medium)
57. [Single Element in a Sorted Array](https://www.internhack.in/learn/dsa/problem/single-element-in-a-sorted-array) (Medium)
58. [String Compression](https://www.internhack.in/learn/dsa/problem/string-compression) (Medium)
59. [Subarray Sum Equals K](https://www.internhack.in/learn/dsa/problem/subarray-sum-equals-k) (Medium)
60. [Target Sum](https://www.internhack.in/learn/dsa/problem/target-sum) (Medium)
61. [Time Needed to Rearrange a Binary String](https://www.internhack.in/learn/dsa/problem/time-needed-to-rearrange-a-binary-string) (Medium)
62. [Top K Frequent Elements](https://www.internhack.in/learn/dsa/problem/top-k-frequent-elements) (Medium)
63. [Top K Frequent Words](https://www.internhack.in/learn/dsa/problem/top-k-frequent-words) (Medium)
64. [Vowels of All Substrings](https://www.internhack.in/learn/dsa/problem/vowels-of-all-substrings) (Medium)
65. [Word Search](https://www.internhack.in/learn/dsa/problem/word-search) (Medium)
66. [Zigzag Conversion](https://www.internhack.in/learn/dsa/problem/zigzag-conversion) (Medium)
67. [Critical Connections in a Network](https://www.internhack.in/learn/dsa/problem/critical-connections-in-a-network) (Hard)
68. [Find Minimum Diameter After Merging Two Trees](https://www.internhack.in/learn/dsa/problem/find-minimum-diameter-after-merging-two-trees) (Hard)
69. [First Missing Positive](https://www.internhack.in/learn/dsa/problem/first-missing-positive) (Hard)
70. [LFU Cache](https://www.internhack.in/learn/dsa/problem/lfu-cache) (Hard)
71. [Median of Two Sorted Arrays](https://www.internhack.in/learn/dsa/problem/median-of-two-sorted-arrays) (Hard)
72. [Minimum One Bit Operations to Make Integers Zero](https://www.internhack.in/learn/dsa/problem/minimum-one-bit-operations-to-make-integers-zero) (Hard)
73. [Number of Distinct Roll Sequences](https://www.internhack.in/learn/dsa/problem/number-of-distinct-roll-sequences) (Hard)
74. [Number of Visible People in a Queue](https://www.internhack.in/learn/dsa/problem/number-of-visible-people-in-a-queue) (Hard)
75. [Sliding Window Maximum](https://www.internhack.in/learn/dsa/problem/sliding-window-maximum) (Hard)
76. [Subarrays with K Different Integers](https://www.internhack.in/learn/dsa/problem/subarrays-with-k-different-integers) (Hard)
77. [Trapping Rain Water](https://www.internhack.in/learn/dsa/problem/trapping-rain-water) (Hard)
78. [Word Ladder](https://www.internhack.in/learn/dsa/problem/word-ladder) (Hard)

## Prepare for the rest of the Servicenow process

- [Aptitude questions by company](https://www.internhack.in/learn/aptitude/companies)
- [Technical interview questions](https://www.internhack.in/learn/interview)
- [Free ATS resume check](https://www.internhack.in/ats-score/try), no signup

## Other companies

- [Google](https://www.internhack.in/learn/dsa/companies/google) (2217)
- [Amazon](https://www.internhack.in/learn/dsa/companies/amazon) (1938)
- [Meta](https://www.internhack.in/learn/dsa/companies/meta) (1387)
- [Microsoft](https://www.internhack.in/learn/dsa/companies/microsoft) (1352)
- [Bloomberg](https://www.internhack.in/learn/dsa/companies/bloomberg) (1173)
- [Tiktok](https://www.internhack.in/learn/dsa/companies/tiktok) (383)
- [Uber](https://www.internhack.in/learn/dsa/companies/uber) (381)
- [Apple](https://www.internhack.in/learn/dsa/companies/apple) (356)
- [Oracle](https://www.internhack.in/learn/dsa/companies/oracle) (340)
- [Goldman Sachs](https://www.internhack.in/learn/dsa/companies/goldman-sachs) (270)
- [Adobe](https://www.internhack.in/learn/dsa/companies/adobe) (227)
- [TCS](https://www.internhack.in/learn/dsa/companies/tcs) (217)
- [Salesforce](https://www.internhack.in/learn/dsa/companies/salesforce) (189)
- [Linkedin](https://www.internhack.in/learn/dsa/companies/linkedin) (180)
- [Zoho](https://www.internhack.in/learn/dsa/companies/zoho) (179)
- [IBM](https://www.internhack.in/learn/dsa/companies/ibm) (170)
- [Infosys](https://www.internhack.in/learn/dsa/companies/infosys) (158)
- [Walmart Labs](https://www.internhack.in/learn/dsa/companies/walmart-labs) (152)
- [Accenture](https://www.internhack.in/learn/dsa/companies/accenture) (144)
- [Nvidia](https://www.internhack.in/learn/dsa/companies/nvidia) (137)
- [Yandex](https://www.internhack.in/learn/dsa/companies/yandex) (134)
- [DE Shaw](https://www.internhack.in/learn/dsa/companies/de-shaw) (124)
- [Visa](https://www.internhack.in/learn/dsa/companies/visa) (124)
- [Flipkart](https://www.internhack.in/learn/dsa/companies/flipkart) (117)

## Related

- [Home](https://www.internhack.in/)
- [Learn](https://www.internhack.in/learn)
- [DSA by company](https://www.internhack.in/learn/dsa/companies)
