[LeetCode] 59. Spiral Matrix II - Java
·
알고리즘/LeetCode
https://leetcode.com/problems/spiral-matrix-ii/description/ Spiral Matrix II - LeetCode Can you solve this real interview question? Spiral Matrix II - Given a positive integer n, generate an n x n matrix filled with elements from 1 to n2 in spiral order. Example 1: [https://assets.leetcode.com/uploads/2020/11/13/spiraln.jpg] Input: n = 3 O leetcode.com 문제 Given a positive integer n, generate an ..
[LeetCode] 1572. Matrix Diagonal Sum - Java
·
알고리즘/LeetCode
https://leetcode.com/problems/matrix-diagonal-sum/description/ Matrix Diagonal Sum - LeetCode Can you solve this real interview question? Matrix Diagonal Sum - Given a square matrix mat, return the sum of the matrix diagonals. Only include the sum of all the elements on the primary diagonal and all the elements on the secondary diagonal that are leetcode.com 문제 Given a square matrix mat, return ..
[LeetCode] 79. Word Search - Java
·
알고리즘/LeetCode
https://leetcode.com/problems/word-search/ Word Search - LeetCode Word Search - Given an m x n grid of characters board and a string word, return true if word exists in the grid. The word can be constructed from letters of sequentially adjacent cells, where adjacent cells are horizontally or vertically neighboring. The s leetcode.com 문제 Given an m x n grid of characters board and a string word, ..
[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..
HYOJUN
'Matrix' 태그의 글 목록