목록리트코그 (1)
어흥
[LeetCode] Zigzag Conversion (Java)
문제 링크: https://leetcode.com/problems/zigzag-conversion/ Zigzag Conversion - 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 1. 주의할 점 - 큰 2차원 배열을 사용하지 않는다(Ex. 1시 방향으로 올라갈때 우측 1칸, 위로 1칸) → 메모리 절약 - numRows의 값에 따라 패턴 길이를 구한다 2. 구현 - String[] 배열에 문자들을 추가하는 방식으로 구현한다 - 몇 개를 기준으로 각 문자열이 ..
알고리즘/LeetCode
2022. 2. 17. 18:38