[LeetCode] 48. Rotate Image - Java
·
알고리즘/LeetCode
https://leetcode.com/problems/rotate-image/description/ Rotate Image - LeetCode Rotate Image - You are given an n x n 2D matrix representing an image, rotate the image by 90 degrees (clockwise). You have to rotate the image in-place [https://en.wikipedia.org/wiki/In-place_algorithm], which means you have to modify the input 2D matrix leetcode.com 문제 You are given an n x n 2D matrix representing ..
[LeetCode] 54. Spiral Matrix - Java
·
알고리즘/LeetCode
https://leetcode.com/problems/spiral-matrix/ Spiral Matrix - LeetCode 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]] Output: [1,2,3,6,9,8,7,4,5] Example 2: [https://a leetcode.com 문제 Given an m x n matrix, return all elements of the matrix i..
[LeetCode] 73. Set Matrix Zeroes - Java
·
알고리즘/LeetCode
https://leetcode.com/problems/set-matrix-zeroes/description/ Set Matrix Zeroes - LeetCode Set Matrix Zeroes - Given an m x n integer matrix matrix, if an element is 0, set its entire row and column to 0's. You must do it in place [https://en.wikipedia.org/wiki/In-place_algorithm]. Example 1: [https://assets.leetcode.com/uploads/2020/08/17/ma leetcode.com 문제 Given an m x n integer matrix matrix, ..
[LeetCode] 143. Reorder List - Java
·
알고리즘/LeetCode
https://leetcode.com/problems/reorder-list/ Reorder List - LeetCode Reorder List - You are given the head of a singly linked-list. The list can be represented as: L0 → L1 → … → Ln - 1 → Ln Reorder the list to be on the following form: L0 → Ln → L1 → Ln - 1 → L2 → Ln - 2 → … You may not modify the va leetcode.com 문제 You are given the head of a singly linked-list. The list can be represented as: L..
[LeetCode] 23. Merge k Sorted Lists - Java
·
알고리즘/LeetCode
https://leetcode.com/problems/merge-k-sorted-lists/description/ Merge k Sorted Lists - LeetCode Merge k Sorted Lists - You are given an array of k linked-lists lists, each linked-list is sorted in ascending order. Merge all the linked-lists into one sorted linked-list and return it. Example 1: Input: lists = [[1,4,5],[1,3,4],[2,6]] Output: [1,1,2, leetcode.com 문제 You are given an array of k link..
HYOJUN
'알고리즘' 태그의 글 목록 (8 Page)