0 day streak

SAP coding interview questions

ProductEnterprise SaaS India

Ranked by how often candidates report them. Each opens in the editor with hidden tests, an animated walkthrough and solutions in four languages; a question you solve once counts for every company that asks it.

0%ready
Your level: practise every reported question.
ProgressTitleDifficultyTopicHow often hereAlso asked atNext step
Two SumTwo Sum Easy Arrays & Hashing Google, Amazon, Microsoft +135 Solve
Container With Most WaterTwo Pointer Medium Arrays & Hashing Google, Amazon, Microsoft +59 Solve
Search a 2D Matrix2D Binary Search + Step Search Medium Binary Search Microsoft, Nutanix, Goldman Sachs +9 Solve
Lowest Common Ancestor of a Binary TreeLCA Medium Trees & BST Google, Amazon, Microsoft +46 Solve
Merge IntervalsBasics Medium Intervals Google, Amazon, Microsoft +107 Solve
Group AnagramsHashing Medium Arrays & Hashing Amazon, Microsoft, Meta +82 Solve
Longest Common PrefixString Basics Easy Arrays & Hashing Amazon, Microsoft, Bloomberg +41 Solve
Valid ParenthesesStack Basics Easy Stack Google, Amazon, Microsoft +119 Solve
Number of IslandsConnected Components Medium Graphs Google, Amazon, Microsoft +114 Solve
Best Time to Buy and Sell StockState Machine DP - Stock Problems Easy Dynamic Programming Amazon, Microsoft, Apple +101 Solve
Maximal SquareSquares Medium Dynamic Programming Google, Amazon, Airbnb +14 Solve
Reverse Linked ListFront Middle Back Pointer Easy Linked List Microsoft, Apple, Bloomberg +81 Solve
Trapping Rain WaterTwo Pointer Hard Arrays & Hashing Google, Amazon, Microsoft +88 Solve
Daily TemperaturesMonotonic Stack Medium Monotonic Stack Amazon, Grab, TikTok (ByteDance) +20 Solve
Leftmost Column with at Least a One2D Binary Search + Step Search Medium Binary Search Meta, Uber, JioHotstar Solve
Count PrimesMath / Number Theory Medium Arrays & Hashing Databricks, Epic Systems, American Express +19 Solve
Ransom NoteHashing Easy Arrays & Hashing Spotify, Anduril, Tripadvisor +2 Solve
Palindrome NumberMath / Number Theory Easy Arrays & Hashing Bloomberg, Cloudflare, Morgan Stanley +27 Solve
Count Good Nodes in Binary TreeChild + Ancestor Handling Medium Trees & BST Goldman Sachs, DocuSign, Arista Networks Solve
Minimum Size Subarray SumSliding Window · Variable Medium Arrays & Hashing DoorDash, Intel, Citi +3 Solve
Construct Binary Tree from Preorder and Inorder TraversalTree Serialization / Deserialization Medium Trees & BST Microsoft, TikTok (ByteDance), eBay +9 Solve
Implement Queue using StacksStack Basics Easy Stack Microsoft, Meta, Apple +28 Solve
Implement Stack using QueuesStack Basics Easy Stack Twilio, Goldman Sachs, Qualcomm +14 Solve
Kth Largest Element in a StreamTop K / Kth Largest / Smallest Easy Heaps Google, Zillow, Target +8 Solve
Kadane's Algorithm - SimpleKadane's Algorithm Medium Arrays & Hashing Amazon, Microsoft, Apple +79 Solve
Regular Expression MatchingStrings Hard Dynamic Programming Microsoft, Airbnb, Snowflake +17 Solve
Longest Palindromic SubstringStrings Medium Dynamic Programming Amazon, Microsoft, Apple +68 Solve
Longest Substring Without Repeating CharactersSliding Window · Variable Medium Arrays & Hashing Google, Amazon, Microsoft +114 Solve
Valid PalindromeTwo Pointer Easy Arrays & Hashing Microsoft, Meta, Apple +53 Solve
Linked List CycleSlow Fast Pointers Easy Linked List Microsoft, Apple, Nvidia +67 Solve
LRU CacheLinked Lists Medium Design Data Structures Google, Amazon, Microsoft +140 Solve
Kth Largest Element in an ArrayTop K / Kth Largest / Smallest Medium Heaps Amazon, Meta, Apple +51 Solve
Move ZeroesTwo Pointer Easy Arrays & Hashing Amazon, Microsoft, Meta +42 Solve
Coin ChangeKnapsack Medium Dynamic Programming Google, Amazon, Microsoft +55 Solve
Search in Rotated Sorted ArrayRotated Array Medium Binary Search Amazon, Microsoft, Apple +59 Solve
Minimum Window SubstringSliding Window · Hash Map Hard Arrays & Hashing Google, Amazon, Microsoft +37 Solve
Longest Consecutive SequenceHash Set Lookup Medium Arrays & Hashing Google, Amazon, Microsoft +34 Solve
CandyGreedy Hard Arrays & Hashing Nutanix, Dropbox, Goldman Sachs +7 Solve
Word Break1D DP Medium Dynamic Programming Google, Amazon, Microsoft +35 Solve
Max Consecutive Ones IIISliding Window · Variable Medium Arrays & Hashing Amazon, Microsoft, Meta +16 Solve
Maximum Depth of Binary TreeRecursion Easy Trees & BST LinkedIn, Spotify, Tesla +19 Solve
Sqrt(x)Search on Answer Range Easy Binary Search TikTok (ByteDance), Wayfair, Epic Games +15 Solve
Palindrome Linked ListFront Middle Back Pointer Easy Linked List Meta, Spotify, Grab +14 Solve
Add Two NumbersDummy Node Pattern Medium Linked List Amazon, Microsoft, Meta +33 Solve
Contains DuplicateHash Set Lookup Easy Arrays & Hashing Netflix, Airbnb, Spotify +7 Solve
Same TreeRecursion Easy Trees & BST Deutsche Bank, Klarna, Cadence Design Systems +4 Solve
Binary SearchBasics Easy Binary Search Zscaler, Rakuten, Nike +22 Solve
Also reported, being added to AlgoRung (7)

Maximum Path Quality of a Graph · Count Increasing Quadruplets · Valid Perfect Square · Frog Jump II · Binary Search Tree to Greater Sum Tree · Count the Number of Infection Sequences · Maximum Students Taking Exam

Questions people ask

What coding questions does SAP ask most?

Two Sum, Container With Most Water, Search a 2D Matrix, Lowest Common Ancestor of a Binary Tree, Merge Intervals, Group Anagrams, Longest Common Prefix, Valid Parentheses.

Which topics come up in SAP coding rounds?

arrays, strings, linked list, trees, graphs, sliding window.

How hard are SAP coding questions?

Of the reported questions, 19 are easy, 24 medium and 4 hard. A 45 to 60 minute live interview where you solve one or two data-structures-and-algorithms problems while explaining your thinking. Interviewers score problem solving, code quality, testing and communication.