728x90
728x90
[Java] 54. Spiral Matrix - LeetCode daily challenge
코딩테스트/leetcode2023. 5. 9. 19:09[Java] 54. Spiral Matrix - LeetCode daily challenge

https://leetcode.com/problems/spiral-matrix/ Spiral Matrix - LeetCodeCan you solve this real interview question? Spiral Matrix - Given an m x n matrix, return all elements of the matrix in spiral order. Example 1: [https://assets.leetcode.com/uploads/2020/11/13/spiral1.jpg] Input: matrix = [[1,2,3],[4,5,6],[7,8,9]] Outpuleetcode.com 첫번째풀이두통이 조금 심한 날이라 깊게 생각하기 싫었다. 처음 생각난게 DFS, 두번째로 생각난건 while문으로..

728x90
728x90
image