# SAP Coding Interview Questions

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

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

45 DSA problems tagged as asked in SAP coding interviews and online assessments. Below are all 45: 17 easy, 22 medium and 6 hard. Start with the easy ones, then move to medium. Practise free on InternHack and track your progress.

## SAP 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. [Fibonacci Number](https://www.internhack.in/learn/dsa/problem/fibonacci-number) (Easy)
3. [Implement Queue using Stacks](https://www.internhack.in/learn/dsa/problem/implement-queue-using-stacks) (Easy)
4. [Linked List Cycle](https://www.internhack.in/learn/dsa/problem/linked-list-cycle) (Easy)
5. [Longest Common Prefix](https://www.internhack.in/learn/dsa/problem/longest-common-prefix) (Easy)
6. [Move Zeroes](https://www.internhack.in/learn/dsa/problem/move-zeroes) (Easy)
7. [Palindrome Linked List](https://www.internhack.in/learn/dsa/problem/palindrome-linked-list) (Easy)
8. [Palindrome Number](https://www.internhack.in/learn/dsa/problem/palindrome-number) (Easy)
9. [Remove Duplicates from Sorted Array](https://www.internhack.in/learn/dsa/problem/remove-duplicates-from-sorted-array) (Easy)
10. [Reverse Linked List](https://www.internhack.in/learn/dsa/problem/reverse-linked-list) (Easy)
11. [Roman to Integer](https://www.internhack.in/learn/dsa/problem/roman-to-integer) (Easy)
12. [Same Tree](https://www.internhack.in/learn/dsa/problem/same-tree) (Easy)
13. [Sort Array by Increasing Frequency](https://www.internhack.in/learn/dsa/problem/sort-array-by-increasing-frequency) (Easy)
14. [Two Sum](https://www.internhack.in/learn/dsa/problem/two-sum) (Easy)
15. [Valid Palindrome](https://www.internhack.in/learn/dsa/problem/valid-palindrome) (Easy)
16. [Valid Parentheses](https://www.internhack.in/learn/dsa/problem/valid-parentheses) (Easy)
17. [Valid Perfect Square](https://www.internhack.in/learn/dsa/problem/valid-perfect-square) (Easy)
18. [Add Two Numbers](https://www.internhack.in/learn/dsa/problem/add-two-numbers) (Medium)
19. [Binary Search Tree to Greater Sum Tree](https://www.internhack.in/learn/dsa/problem/binary-search-tree-to-greater-sum-tree) (Medium)
20. [Coin Change](https://www.internhack.in/learn/dsa/problem/coin-change) (Medium)
21. [Container With Most Water](https://www.internhack.in/learn/dsa/problem/container-with-most-water) (Medium)
22. [Count Primes](https://www.internhack.in/learn/dsa/problem/count-primes) (Medium)
23. [Group Anagrams](https://www.internhack.in/learn/dsa/problem/group-anagrams) (Medium)
24. [Kth Largest Element in an Array](https://www.internhack.in/learn/dsa/problem/kth-largest-element-in-an-array) (Medium)
25. [Leftmost Column with at Least a One](https://www.internhack.in/learn/dsa/problem/leftmost-column-with-at-least-a-one) (Medium)
26. [Longest Consecutive Sequence](https://www.internhack.in/learn/dsa/problem/longest-consecutive-sequence) (Medium)
27. [Longest Palindromic Substring](https://www.internhack.in/learn/dsa/problem/longest-palindromic-substring) (Medium)
28. [Longest Substring Without Repeating Characters](https://www.internhack.in/learn/dsa/problem/longest-substring-without-repeating-characters) (Medium)
29. [Lowest Common Ancestor of a Binary Tree](https://www.internhack.in/learn/dsa/problem/lowest-common-ancestor-of-a-binary-tree) (Medium)
30. [LRU Cache](https://www.internhack.in/learn/dsa/problem/lru-cache) (Medium)
31. [Maximal Square](https://www.internhack.in/learn/dsa/problem/maximal-square) (Medium)
32. [Maximum Number of Weeks for Which You Can Work](https://www.internhack.in/learn/dsa/problem/maximum-number-of-weeks-for-which-you-can-work) (Medium)
33. [Maximum Subarray](https://www.internhack.in/learn/dsa/problem/maximum-subarray) (Medium)
34. [Merge Intervals](https://www.internhack.in/learn/dsa/problem/merge-intervals) (Medium)
35. [Movie Rating](https://www.internhack.in/learn/dsa/problem/movie-rating) (Medium)
36. [Number of Islands](https://www.internhack.in/learn/dsa/problem/number-of-islands) (Medium)
37. [Product of Array Except Self](https://www.internhack.in/learn/dsa/problem/product-of-array-except-self) (Medium)
38. [Search in Rotated Sorted Array](https://www.internhack.in/learn/dsa/problem/search-in-rotated-sorted-array) (Medium)
39. [Word Break](https://www.internhack.in/learn/dsa/problem/word-break) (Medium)
40. [Candy](https://www.internhack.in/learn/dsa/problem/candy) (Hard)
41. [Count Increasing Quadruplets](https://www.internhack.in/learn/dsa/problem/count-increasing-quadruplets) (Hard)
42. [Count the Number of Infection Sequences](https://www.internhack.in/learn/dsa/problem/count-the-number-of-infection-sequences) (Hard)
43. [Maximum Path Quality of a Graph](https://www.internhack.in/learn/dsa/problem/maximum-path-quality-of-a-graph) (Hard)
44. [Maximum Students Taking Exam](https://www.internhack.in/learn/dsa/problem/maximum-students-taking-exam) (Hard)
45. [Trapping Rain Water](https://www.internhack.in/learn/dsa/problem/trapping-rain-water) (Hard)

## Prepare for the rest of the SAP 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)
