# Goldman Sachs Coding Interview Questions

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

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

270 DSA problems tagged as asked in Goldman Sachs coding interviews and online assessments. Below are the first 100 of 270: 51 easy, 1 medium and 48 hard. Start with the easy ones, then move to medium. Practise free on InternHack and track your progress.

## Goldman Sachs DSA problems, easiest first

1. [Backspace String Compare](https://www.internhack.in/learn/dsa/problem/backspace-string-compare) (Easy)
2. [Best Time to Buy and Sell Stock](https://www.internhack.in/learn/dsa/problem/best-time-to-buy-and-sell-stock) (Easy)
3. [Check if Array Is Sorted and Rotated](https://www.internhack.in/learn/dsa/problem/check-if-array-is-sorted-and-rotated) (Easy)
4. [Check if the Sentence Is Pangram](https://www.internhack.in/learn/dsa/problem/check-if-the-sentence-is-pangram) (Easy)
5. [Climbing Stairs](https://www.internhack.in/learn/dsa/problem/climbing-stairs) (Easy)
6. [Consecutive Characters](https://www.internhack.in/learn/dsa/problem/consecutive-characters) (Easy)
7. [Count Number of Pairs With Absolute Difference K](https://www.internhack.in/learn/dsa/problem/count-number-of-pairs-with-absolute-difference-k) (Easy)
8. [Design HashMap](https://www.internhack.in/learn/dsa/problem/design-hashmap) (Easy)
9. [Determine if Two Events Have Conflict](https://www.internhack.in/learn/dsa/problem/determine-if-two-events-have-conflict) (Easy)
10. [Excel Sheet Column Number](https://www.internhack.in/learn/dsa/problem/excel-sheet-column-number) (Easy)
11. [Find Pivot Index](https://www.internhack.in/learn/dsa/problem/find-pivot-index) (Easy)
12. [First Unique Character in a String](https://www.internhack.in/learn/dsa/problem/first-unique-character-in-a-string) (Easy)
13. [Fizz Buzz](https://www.internhack.in/learn/dsa/problem/fizz-buzz) (Easy)
14. [Flood Fill](https://www.internhack.in/learn/dsa/problem/flood-fill) (Easy)
15. [High Five](https://www.internhack.in/learn/dsa/problem/high-five) (Easy)
16. [Implement Stack using Queues](https://www.internhack.in/learn/dsa/problem/implement-stack-using-queues) (Easy)
17. [Intersection of Two Linked Lists](https://www.internhack.in/learn/dsa/problem/intersection-of-two-linked-lists) (Easy)
18. [Isomorphic Strings](https://www.internhack.in/learn/dsa/problem/isomorphic-strings) (Easy)
19. [Keep Multiplying Found Values by Two](https://www.internhack.in/learn/dsa/problem/keep-multiplying-found-values-by-two) (Easy)
20. [Kth Largest Element in a Stream](https://www.internhack.in/learn/dsa/problem/kth-largest-element-in-a-stream) (Easy)
21. [Linked List Cycle](https://www.internhack.in/learn/dsa/problem/linked-list-cycle) (Easy)
22. [Majority Element](https://www.internhack.in/learn/dsa/problem/majority-element) (Easy)
23. [Maximum Average Subarray I](https://www.internhack.in/learn/dsa/problem/maximum-average-subarray-i) (Easy)
24. [Maximum Population Year](https://www.internhack.in/learn/dsa/problem/maximum-population-year) (Easy)
25. [Merge Sorted Array](https://www.internhack.in/learn/dsa/problem/merge-sorted-array) (Easy)
26. [Merge Two Sorted Lists](https://www.internhack.in/learn/dsa/problem/merge-two-sorted-lists) (Easy)
27. [Middle of the Linked List](https://www.internhack.in/learn/dsa/problem/middle-of-the-linked-list) (Easy)
28. [Minimum Number of Chairs in a Waiting Room](https://www.internhack.in/learn/dsa/problem/minimum-number-of-chairs-in-a-waiting-room) (Easy)
29. [Minimum Value to Get Positive Step by Step Sum](https://www.internhack.in/learn/dsa/problem/minimum-value-to-get-positive-step-by-step-sum) (Easy)
30. [Missing Number](https://www.internhack.in/learn/dsa/problem/missing-number) (Easy)
31. [Move Zeroes](https://www.internhack.in/learn/dsa/problem/move-zeroes) (Easy)
32. [Next Greater Element I](https://www.internhack.in/learn/dsa/problem/next-greater-element-i) (Easy)
33. [Pascal's Triangle](https://www.internhack.in/learn/dsa/problem/pascals-triangle) (Easy)
34. [Pascal's Triangle II](https://www.internhack.in/learn/dsa/problem/pascals-triangle-ii) (Easy)
35. [Path Sum](https://www.internhack.in/learn/dsa/problem/path-sum) (Easy)
36. [Perform String Shifts](https://www.internhack.in/learn/dsa/problem/perform-string-shifts) (Easy)
37. [Power of Three](https://www.internhack.in/learn/dsa/problem/power-of-three) (Easy)
38. [Power of Two](https://www.internhack.in/learn/dsa/problem/power-of-two) (Easy)
39. [Remove One Element to Make the Array Strictly Increasing](https://www.internhack.in/learn/dsa/problem/remove-one-element-to-make-the-array-strictly-increasing) (Easy)
40. [Reverse Linked List](https://www.internhack.in/learn/dsa/problem/reverse-linked-list) (Easy)
41. [Reverse String](https://www.internhack.in/learn/dsa/problem/reverse-string) (Easy)
42. [Robot Return to Origin](https://www.internhack.in/learn/dsa/problem/robot-return-to-origin) (Easy)
43. [Roman to Integer](https://www.internhack.in/learn/dsa/problem/roman-to-integer) (Easy)
44. [Sort Array by Increasing Frequency](https://www.internhack.in/learn/dsa/problem/sort-array-by-increasing-frequency) (Easy)
45. [Sqrt(x)](https://www.internhack.in/learn/dsa/problem/sqrtx) (Easy)
46. [Symmetric Tree](https://www.internhack.in/learn/dsa/problem/symmetric-tree) (Easy)
47. [Third Maximum Number](https://www.internhack.in/learn/dsa/problem/third-maximum-number) (Easy)
48. [Two Sum](https://www.internhack.in/learn/dsa/problem/two-sum) (Easy)
49. [Two Sum IV - Input is a BST](https://www.internhack.in/learn/dsa/problem/two-sum-iv-input-is-a-bst) (Easy)
50. [Valid Palindrome](https://www.internhack.in/learn/dsa/problem/valid-palindrome) (Easy)
51. [Valid Parentheses](https://www.internhack.in/learn/dsa/problem/valid-parentheses) (Easy)
52. [Group Anagrams](https://www.internhack.in/learn/dsa/problem/group-anagrams) (Medium)
53. [Allocate Mailboxes](https://www.internhack.in/learn/dsa/problem/allocate-mailboxes) (Hard)
54. [Best Time to Buy and Sell Stock III](https://www.internhack.in/learn/dsa/problem/best-time-to-buy-and-sell-stock-iii) (Hard)
55. [Best Time to Buy and Sell Stock IV](https://www.internhack.in/learn/dsa/problem/best-time-to-buy-and-sell-stock-iv) (Hard)
56. [Binary Tree Cameras](https://www.internhack.in/learn/dsa/problem/binary-tree-cameras) (Hard)
57. [Binary Tree Maximum Path Sum](https://www.internhack.in/learn/dsa/problem/binary-tree-maximum-path-sum) (Hard)
58. [Burst Balloons](https://www.internhack.in/learn/dsa/problem/burst-balloons) (Hard)
59. [Bus Routes](https://www.internhack.in/learn/dsa/problem/bus-routes) (Hard)
60. [Candy](https://www.internhack.in/learn/dsa/problem/candy) (Hard)
61. [Cherry Pickup](https://www.internhack.in/learn/dsa/problem/cherry-pickup) (Hard)
62. [Count of Integers](https://www.internhack.in/learn/dsa/problem/count-of-integers) (Hard)
63. [Count Palindromic Subsequences](https://www.internhack.in/learn/dsa/problem/count-palindromic-subsequences) (Hard)
64. [Find Median from Data Stream](https://www.internhack.in/learn/dsa/problem/find-median-from-data-stream) (Hard)
65. [Find Shortest Path with K Hops](https://www.internhack.in/learn/dsa/problem/find-shortest-path-with-k-hops) (Hard)
66. [Find the Closest Palindrome](https://www.internhack.in/learn/dsa/problem/find-the-closest-palindrome) (Hard)
67. [First Missing Positive](https://www.internhack.in/learn/dsa/problem/first-missing-positive) (Hard)
68. [Integer to English Words](https://www.internhack.in/learn/dsa/problem/integer-to-english-words) (Hard)
69. [Largest Rectangle in Histogram](https://www.internhack.in/learn/dsa/problem/largest-rectangle-in-histogram) (Hard)
70. [LFU Cache](https://www.internhack.in/learn/dsa/problem/lfu-cache) (Hard)
71. [Longest Duplicate Substring](https://www.internhack.in/learn/dsa/problem/longest-duplicate-substring) (Hard)
72. [Longest Valid Parentheses](https://www.internhack.in/learn/dsa/problem/longest-valid-parentheses) (Hard)
73. [Maximal Rectangle](https://www.internhack.in/learn/dsa/problem/maximal-rectangle) (Hard)
74. [Maximize Palindrome Length From Subsequences](https://www.internhack.in/learn/dsa/problem/maximize-palindrome-length-from-subsequences) (Hard)
75. [Maximum Profit in Job Scheduling](https://www.internhack.in/learn/dsa/problem/maximum-profit-in-job-scheduling) (Hard)
76. [Median of Two Sorted Arrays](https://www.internhack.in/learn/dsa/problem/median-of-two-sorted-arrays) (Hard)
77. [Meeting Rooms III](https://www.internhack.in/learn/dsa/problem/meeting-rooms-iii) (Hard)
78. [Merge k Sorted Lists](https://www.internhack.in/learn/dsa/problem/merge-k-sorted-lists) (Hard)
79. [Minimum Number of Moves to Make Palindrome](https://www.internhack.in/learn/dsa/problem/minimum-number-of-moves-to-make-palindrome) (Hard)
80. [Minimum Number of Refueling Stops](https://www.internhack.in/learn/dsa/problem/minimum-number-of-refueling-stops) (Hard)
81. [Minimum Window Substring](https://www.internhack.in/learn/dsa/problem/minimum-window-substring) (Hard)
82. [N-Queens](https://www.internhack.in/learn/dsa/problem/n-queens) (Hard)
83. [Numbers With Repeated Digits](https://www.internhack.in/learn/dsa/problem/numbers-with-repeated-digits) (Hard)
84. [Optimal Account Balancing](https://www.internhack.in/learn/dsa/problem/optimal-account-balancing) (Hard)
85. [Palindrome Pairs](https://www.internhack.in/learn/dsa/problem/palindrome-pairs) (Hard)
86. [Parsing A Boolean Expression](https://www.internhack.in/learn/dsa/problem/parsing-a-boolean-expression) (Hard)
87. [Reaching Points](https://www.internhack.in/learn/dsa/problem/reaching-points) (Hard)
88. [Reverse Nodes in k-Group](https://www.internhack.in/learn/dsa/problem/reverse-nodes-in-k-group) (Hard)
89. [Russian Doll Envelopes](https://www.internhack.in/learn/dsa/problem/russian-doll-envelopes) (Hard)
90. [Shortest Subarray with Sum at Least K](https://www.internhack.in/learn/dsa/problem/shortest-subarray-with-sum-at-least-k) (Hard)
91. [Sliding Window Maximum](https://www.internhack.in/learn/dsa/problem/sliding-window-maximum) (Hard)
92. [Sudoku Solver](https://www.internhack.in/learn/dsa/problem/sudoku-solver) (Hard)
93. [Super Egg Drop](https://www.internhack.in/learn/dsa/problem/super-egg-drop) (Hard)
94. [Text Justification](https://www.internhack.in/learn/dsa/problem/text-justification) (Hard)
95. [The Skyline Problem](https://www.internhack.in/learn/dsa/problem/the-skyline-problem) (Hard)
96. [Trapping Rain Water](https://www.internhack.in/learn/dsa/problem/trapping-rain-water) (Hard)
97. [Trapping Rain Water II](https://www.internhack.in/learn/dsa/problem/trapping-rain-water-ii) (Hard)
98. [Unique Paths III](https://www.internhack.in/learn/dsa/problem/unique-paths-iii) (Hard)
99. [Valid Arrangement of Pairs](https://www.internhack.in/learn/dsa/problem/valid-arrangement-of-pairs) (Hard)
100. [Word Ladder](https://www.internhack.in/learn/dsa/problem/word-ladder) (Hard)

## Prepare for the rest of the Goldman Sachs 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)
- [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)
- [Paypal](https://www.internhack.in/learn/dsa/companies/paypal) (106)

## Related

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