분류 전체보기

    [LeetCode]Validate Binary Search Tree

    https://leetcode.com/problems/validate-binary-search-tree/description/ Validate Binary Search Tree - LeetCode Can you solve this real interview question? Validate Binary Search Tree - Given the root of a binary tree, determine if it is a valid binary search tree (BST). A valid BST is defined as follows: * The left subtree of a node contains only nodes with keys le leetcode.com 문제 분석 주어진 Tree가 유효..

    [LeetCode]Word Search

    https://leetcode.com/problems/word-search/ Word Search - LeetCode Can you solve this real interview question? 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 h leetcode.com 문제 분석 주어진 board를 수평, 수직으로 이동하면서 탐색할 때 word를 만들 수 있는지를 구하는 문제입니..

    [LeetCode]Subsets

    https://leetcode.com/problems/subsets/ Subsets - LeetCode Can you solve this real interview question? Subsets - Given an integer array nums of unique elements, return all possible subsets (the power set). The solution set must not contain duplicate subsets. Return the solution in any order. Example 1: Input: n leetcode.com 문제 분석 주어진 숫자배열을 가지고 가능한 모든 부분집합을 구하는 문제입니다. 순서는 상관 없습니다. 처음 시도한 답안 class ..

    [LeetCode]Sort Colors

    https://leetcode.com/problems/sort-colors/ Sort Colors - LeetCode Can you solve this real interview question? Sort Colors - Given an array nums with n objects colored red, white, or blue, sort them in-place [https://en.wikipedia.org/wiki/In-place_algorithm] so that objects of the same color are adjacent, with the colors leetcode.com 문제 분석 주어진 nums 배열에 담긴 color들을 인접하도록 정렬하는 문제입니다. 처음 시도한 답안 class..

    [LeetCode]Search a 2D Matrix

    https://leetcode.com/problems/search-a-2d-matrix/description/ Search a 2D Matrix - LeetCode Can you solve this real interview question? Search a 2D Matrix - You are given an m x n integer matrix matrix with the following two properties: * Each row is sorted in non-decreasing order. * The first integer of each row is greater than the last integer leetcode.com 문제 분석 주어진 2D Matrix에 target 값이 존재하는지를..

    [LeetCode]Set Matrix Zeroes

    https://leetcode.com/problems/set-matrix-zeroes/description/ Set Matrix Zeroes - LeetCode Can you solve this real interview question? 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 leetcode.com 문제 분석 m*n matrix에서 0을 만날 때 해당 위치가 들어간 row..

    [LeetCode]Minimum Path Sum

    https://leetcode.com/problems/minimum-path-sum/ Minimum Path Sum - LeetCode Can you solve this real interview question? Minimum Path Sum - Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right, which minimizes the sum of all numbers along its path. Note: You can only move either down or rig leetcode.com 문제 분석 주어진 m*n grid에서 오른쪽 or 아래로만 이동할 수 있습니다. 가장 왼쪽 위..

    [LeetCode]Jump Game

    https://leetcode.com/problems/jump-game/ Jump Game - LeetCode Can you solve this real interview question? Jump Game - You are given an integer array nums. You are initially positioned at the array's first index, and each element in the array represents your maximum jump length at that position. Return true if you can leetcode.com 문제 분석 nums 배열이 주어졌을 때 마지막 index에 도달할 수 있는지를 구하는 문제입니다. 처음 시도한 답안 c..

    [LeetCode]Spiral Matrix II

    https://leetcode.com/problems/spiral-matrix-ii/ 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 문제 분석 n의 값이 주어지는 n*n matrix에서 Sprial 순서대로 탐색을 했을 경우의 ma..

    [LeetCode]Spiral Matrix

    https://leetcode.com/problems/spiral-matrix/ Spiral Matrix - LeetCode Can you solve this real interview question? 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]] Outpu leetcode.com 문제 분석 주어진 Grid를 시계 방향으로 달팽이 회전하듯이 탐색할 때 그 경로를 기록하는 문제입니다. 처음 ..