SAP coding interview
questions, leaked.
39 problems reported across recent SAP interviews. Top patterns: array, dynamic programming, hash table. The list below is what most reported candidates actually saw, plus the honest play if you can't grind all of it.
SAP's assessment is array-heavy and deceptively layered. You're looking at 39 problems split 15 easy, 18 medium, 6 hard, but arrays dominate 23 of them. That's not a hint. That's the shape of the filter. You'll see two-pointers, dynamic programming, and hash tables woven through the rest, and if you hit a wall on the live OA, StealthCoder runs invisibly and surfaces a working solution in seconds. The real edge isn't knowing every pattern. It's not blanking when one shows up.
Top problems at SAP
| # | Problem | Diff | Frequency | Pass % | Patterns |
|---|---|---|---|---|---|
| 01 | Two Sum | EASY | 100.0 | 56% | Array · Hash Table |
| 02 | Container With Most Water | MEDIUM | 91.8 | 58% | Array · Two Pointers · Greedy |
| 03 | Maximum Students Taking Exam | HARD | 91.8 | 52% | Array · Dynamic Programming · Bit Manipulation |
| 04 | Count Increasing Quadruplets | HARD | 91.8 | 34% | Array · Dynamic Programming · Binary Indexed Tree |
| 05 | Count the Number of Infection Sequences | HARD | 91.8 | 33% | Array · Math · Combinatorics |
| 06 | Maximum Path Quality of a Graph | HARD | 91.8 | 60% | Array · Backtracking · Graph |
| 07 | Movie Rating | MEDIUM | 91.8 | 42% | Database |
| 08 | Longest Common Prefix | EASY | 89.3 | 45% | String · Trie |
| 09 | Valid Parentheses | EASY | 83.2 | 42% | String · Stack |
| 10 | Number of Islands | MEDIUM | 79.4 | 62% | Array · Depth-First Search · Breadth-First Search |
| 11 | Valid Palindrome | EASY | 69.6 | 51% | Two Pointers · String |
| 12 | Maximum Subarray | MEDIUM | 69.6 | 52% | Array · Divide and Conquer · Dynamic Programming |
| 13 | Trapping Rain Water | HARD | 69.6 | 65% | Array · Two Pointers · Dynamic Programming |
| 14 | Reverse Linked List | EASY | 69.6 | 79% | Linked List · Recursion |
| 15 | Maximal Square | MEDIUM | 69.6 | 49% | Array · Dynamic Programming · Matrix |
| 16 | Maximum Number of Weeks for Which You Can Work | MEDIUM | 62.7 | 41% | Array · Greedy |
| 17 | Remove Duplicates from Sorted Array | EASY | 62.7 | 60% | Array · Two Pointers |
| 18 | Longest Consecutive Sequence | MEDIUM | 62.7 | 47% | Array · Hash Table · Union Find |
| 19 | Kth Largest Element in an Array | MEDIUM | 62.7 | 68% | Array · Divide and Conquer · Sorting |
| 20 | Daily Temperatures | MEDIUM | 62.7 | 67% | Array · Stack · Monotonic Stack |
| 21 | Best Time to Buy and Sell Stock | EASY | 62.7 | 55% | Array · Dynamic Programming |
| 22 | Leftmost Column with at Least a One | MEDIUM | 62.7 | 55% | Array · Binary Search · Matrix |
| 23 | Longest Palindromic Substring | MEDIUM | 62.7 | 36% | Two Pointers · String · Dynamic Programming |
| 24 | Rotate String | EASY | 62.7 | 64% | String · String Matching |
| 25 | Group Anagrams | MEDIUM | 52.9 | 71% | Array · Hash Table · String |
| 26 | Word Break | MEDIUM | 52.9 | 48% | Array · Hash Table · String |
| 27 | Linked List Cycle | EASY | 52.9 | 53% | Hash Table · Linked List · Two Pointers |
| 28 | Coin Change | MEDIUM | 52.9 | 46% | Array · Dynamic Programming · Breadth-First Search |
| 29 | Fibonacci Number | EASY | 52.9 | 73% | Math · Dynamic Programming · Recursion |
| 30 | Monotone Increasing Digits | MEDIUM | 52.9 | 49% | Math · Greedy |
| 31 | Sort Array by Increasing Frequency | EASY | 52.9 | 80% | Array · Hash Table · Sorting |
| 32 | Sqrt(x) | EASY | 52.9 | 40% | Math · Binary Search |
| 33 | Valid Perfect Square | EASY | 52.9 | 44% | Math · Binary Search |
| 34 | Maximum Employees to Be Invited to a Meeting | HARD | 52.9 | 62% | Depth-First Search · Graph · Topological Sort |
| 35 | Maximum Depth of Binary Tree | EASY | 52.9 | 77% | Tree · Depth-First Search · Breadth-First Search |
| 36 | LRU Cache | MEDIUM | 52.9 | 45% | Hash Table · Linked List · Design |
| 37 | Max Consecutive Ones III | MEDIUM | 52.9 | 66% | Array · Binary Search · Sliding Window |
| 38 | Binary Search Tree to Greater Sum Tree | MEDIUM | 52.9 | 88% | Tree · Depth-First Search · Binary Search Tree |
| 39 | Move Zeroes | EASY | 52.9 | 63% | Array · Two Pointers |
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 SAP OA. The proctor cannot see it. Screen share cannot detect it. Built because the OA filter rejects engineers who'd pass the on-site. That's a broken filter. This is the workaround.
Get StealthCoder- array23 · 59%
- dynamic programming10 · 26%
- hash table7 · 18%
- string7 · 18%
- two pointers7 · 18%
- math5 · 13%
- depth first search4 · 10%
- matrix4 · 10%
- binary search4 · 10%
- sorting3 · 8%
Arrays are the throughline here. Every third problem touches them, often paired with two-pointers or DP for medium and hard. Two Sum and Container With Most Water are your bread and butter on the easy and medium side. The hard tier pivots to DP-array hybrids like Maximum Students Taking Exam and Trapping Rain Water, which require both pattern recognition and composure under time pressure. Hash tables and strings are present but secondary. Study arrays and two-pointers first, then DP. If you've drilled the medium-tier array problems, you'll recognize the shape of the hard ones. If you haven't, or you blank mid-assessment, StealthCoder is your safety net on the live OA.
Companies with similar patterns
If you prepped for SAP, these companies recycle ~60% of the same topics.
You've seen the list.
Now make sure you pass SAP.
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. Built because the OA filter rejects engineers who'd pass the on-site. That's a broken filter. This is the workaround. Works on HackerRank, CodeSignal, CoderPad, and Karat.
SAP interview FAQ
How many array problems should I solve before the SAP assessment?+
SAP's list has 23 array problems out of 39 total. Hit at least 15 to 20 before the OA. Prioritize two-pointers and DP subsets first. Two Sum and Container With Most Water are your baseline. Then move to Maximum Subarray and Trapping Rain Water patterns.
Is dynamic programming required for SAP's assessment?+
Yes. DP appears in 10 of 39 problems and shows up in 4 of the 6 hard problems. You don't need to master it, but you need to recognize when a problem is asking for cumulative state or optimal subsequences. MaximalSquare and Maximum Subarray are the gateway problems.
Should I study two-pointers or hash tables first?+
Two-pointers. It appears in 7 problems and is baked into several medium-tier array questions like Container With Most Water. Hash tables appear in 7 as well, but they're often auxiliary to the main pattern. Solve two-pointers problems first, hash tables second.
What's the hardest topic in SAP's assessment?+
The intersection of arrays, DP, and bit manipulation. Problems like Maximum Students Taking Exam and Count Increasing Quadruplets require you to track multiple constraints simultaneously. These are rare but worth one deliberate run-through before the OA.
Are strings and stacks important for SAP?+
Secondary. Strings appear in 7 problems, stacks in 3. Valid Parentheses and Longest Common Prefix are your baseline. They're lower frequency than arrays and two-pointers, so don't lead with them unless you've already drilled the core array and DP patterns.