Angad Sandhu
Search
Browse

54 Spiral Matrix

Source name
54 Spiral Matrix.py
# File: Leetcode/Solutions/54_Spiral_Matrix.py

"""
Problem Number: 54
Problem Name: Spiral Matrix
Difficulty: Medium
Tags: Matrix, Simulation, Two Pointers, Neetcode 150
Company (Frequency): Amazon, Google, Facebook, Microsoft, Apple
Leetcode Link: <https://leetcode.com/problems/spiral-matrix/description/>

DESCRIPTION

Return matrix elements in spiral order.
Approaches:

* Maintain boundaries (top, bottom, left, right) and traverse while updating them.
"""

Browse the library