[Medium] 973. K Closest Points to Origin
leetCode 2022. 7. 1. 11:36

문제 https://leetcode.com/problems/k-closest-points-to-origin/submissions/ K Closest Points to Origin - 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 Given an array of points where points[i] = [xi, yi] represents a point on the X-Y plane and an integer k, return the k closest point..

[Medium] Spiral Matrix
leetCode 2022. 7. 1. 11:20

문제 https://leetcode.com/problems/spiral-matrix/submissions/ 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 Given an m x n matrix, return all elements of the matrix in spiral order. m x n 행렬이 주어지면 행렬의 모든 요소를 나선형 순서로 반환합니다. 예시 Example 1: Input: matrix = [[1,2,3],[4,5..

[Easy] 1886. Determine Whether Matrix Can Be Obtained By Rotation
leetCode 2022. 6. 30. 11:32

문제 Given two n x n binary matrices mat and target, return true if it is possible to make mat equal to target by rotating mat in 90-degree increments, or false otherwise. 두 개의 n x n 이진 행렬 매트와 타겟이 주어지면 매트를 90도 단위로 회전시켜 표적으로 동일하게 만들 수 있으면 true를 반환하고 그렇지 않으면 false를 반환합니다. 예시 Example 1: Input: mat = [[0,1],[1,0]], target = [[1,0],[0,1]] Output: true Explanation: We can rotate mat 90 degrees clockwise..

[Medium] Rotate Image
leetCode 2022. 6. 30. 11:07

문제 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, which means you have to modify the input 2D matrix directly. DO NOT allocate another 2D matrix and do the rotation. 이미지를 나타내는 n x n 2D 매트릭스가 제공되면 이미지를 90도(시계 방향) 회전합니다. 이미지는 제자리에서 회전해야 합니다. 즉, 입력 2D 매트릭스를 직접 수정해야 합니다. 다른 2D 매트릭스를 할당하지 않고 회전을 수행합니다. 예시 Exam..

[Medium] 739. Daily Temperatures
leetCode 2022. 6. 17. 09:14

문제 Given an array of integers temperatures represents the daily temperatures, return an array answer such that answer[i] is the number of days you have to wait after the ith day to get a warmer temperature. If there is no future day for which this is possible, keep answer[i] == 0 instead. 일별 온도를 나타내는 정수 배열이 주어지면, [i]라고 대답하는 배열 응답을 반환합니다. 이 답변은 더 따뜻한 온도를 얻기 위해 셋째 날 이후에 기다려야 하는 일 수입니다. 가능한 미래 요일이 ..

[Easy] 989. Add to Array-Form of Integer
leetCode 2022. 6. 15. 16:08

문제 The array-form of an integer num is an array representing its digits in left to right order. For example, for num = 1321, the array form is [1,3,2,1]. Given num, the array-form of an integer, and an integer k, return the array-form of the integer num + k. 정수 번호의 배열 형식은 왼쪽에서 오른쪽 순서로 숫자를 나타내는 배열이다. 예를 들어, num = 1321의 경우 배열 형식은 [1,3,2,1]입니다. 주어진 num, 정수의 배열 형식 및 정수 k가 주어지면 정수 num + k의 배열 형식을 반환한..

[Easy] 150. Evaluate Reverse Polish Notation
leetCode 2022. 6. 13. 13:44

문제 Evaluate the value of an arithmetic expression in Reverse Polish Notation. Valid operators are +, -, *, and /. Each operand may be an integer or another expression. Note that division between two integers should truncate toward zero. It is guaranteed that the given RPN expression is always valid. That means the expression would always evaluate to a result, and there will not be any division b..

[Easy] 66. Plus One
leetCode 2022. 6. 13. 13:34

문제 You are given a large integer represented as an integer array digits, where each digits[i] is the ith digit of the integer. The digits are ordered from most significant to least significant in left-to-right order. The large integer does not contain any leading 0's. Increment the large integer by one and return the resulting array of digits. 정수 배열 자릿수로 표현되는 큰 정수가 제공되며, 여기서 각 자릿수[i]는 정수의 i번째 자리..