Clockwise Outside-In Walk of a Grid
Asked at Goldman Sachs · Coding Questions · Difficulty: Medium · Last asked Nov 15, 2024
Read every element of a rectangular grid in a clockwise walk that starts at the top-left corner and winds inward. Walk right along the top row, down the right column, left along the bottom row and up the left column, then repeat on the smaller rectangle inside, until every element has been visited exactly once.
Loading the problem…
More Goldman Sachs interview questions
- Probability and Statistics Drill: Eight Numeric Problems
- Merge K Sorted Lists (including K=3)
- Goldman Hirevue Behavioral Bank (6 Questions)
- Goldman Sachs HireVue Behavioral and Recursion
- Explain Recursion to a Non-CS Audience
- Implement a Deque From Scratch