250x250
반응형
Notice
Recent Posts
Recent Comments
Link
목록Spiral (1)
N
(Leet Code JS)Spiral Matrix
https://leetcode.com/problems/spiral-matrix/ Spiral Matrix - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 주어진 배열을 Spiral로 순회하면서 수를 저장하는 문제. m과 n을 각각 matrix의 가로, 세로 길이로 저장. direct는 spiral로 순회하기 위한 방향 배열. visited는 방문 여부 확인 배열. x와 y는 현재 좌표를 뜻하며, d는 direct의 인덱스를 나타낸다. rangeCheck() 함..
Leet Code 알고리즘
2022. 3. 21. 10:04