본문 바로가기

전체 글

(214)
[LeetCode] Word Search 풀어보기 https://leetcode.com/problems/word-search/description/ Word Search - LeetCodeCan 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 hleetcode.com이번 문제는 dfs를 활용하는 문제입니다.bfs를 사용하고 싶어도 귀찮은 문제입니다.예를 들어 ..
[LeetCode] Lowest Common Ancestor of a Binary Tree풀어보 https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree/description/ Lowest Common Ancestor of a Binary Tree - LeetCodeCan you solve this real interview question? Lowest Common Ancestor of a Binary Tree - Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree. According to the definition of LCA on Wikipedia [https://en.wikipedia.org/wiki/leetcode...
[LeetCode] KthSmallestElement 풀어보기 https://leetcode.com/problems/kth-smallest-element-in-a-bst/submissions/2181159452/ Kth Smallest Element in a BST - LeetCodeCan you solve this real interview question? Kth Smallest Element in a BST - Given the root of a binary search tree, and an integer k, return the kth smallest value (1-indexed) of all the values of the nodes in the tree. Example 1: [https://assets.leetcoleetcode.com주말인만큼 아..
[LeetCode] Validate Binary Search Tree 풀어보기 https://leetcode.com/problems/validate-binary-search-tree/description Validate Binary Search Tree - LeetCodeCan 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 sleetcode.com 이번에는 BST를 Search하는 문제입..
[LeetCode] Permutation in String 풀어보기 https://leetcode.com/problems/permutation-in-string/description Permutation in String - LeetCodeCan you solve this real interview question? Permutation in String - Given two strings s1 and s2, return true if s2 contains a permutation of s1, or false otherwise. In other words, return true if one of s1's permutations is the substring of s2. Exampleleetcode.com이번 문제는 아이디어를 사용하는 문제였습니다. s1을 permut..
[LeetCode] Minimum Size Subarray Sum 풀어보기 https://leetcode.com/problems/longest-repeating-character-replacement/submissions/2171812721/ Longest Repeating Character Replacement - LeetCodeCan you solve this real interview question? Longest Repeating Character Replacement - You are given a string s and an integer k. You can choose any character of the string and change it to any other uppercase English character. You can perform this opera..
[LeetCode] Minimum Size Subarray Sum 풀어보기 https://leetcode.com/problems/minimum-size-subarray-sum/description/ Minimum Size Subarray Sum - LeetCodeCan you solve this real interview question? Minimum Size Subarray Sum - Given an array of positive integers nums and a positive integer target, return the minimal length of a subarray whose sum is greater than or equal to target. If there is no such subarrleetcode.com비교적 간단한 투포인터? 슬라이딩윈도우? 문제..
[LeetCode] Trapping Rain Water 풀어보기 https://leetcode.com/problems/trapping-rain-water/ Trapping Rain Water - LeetCodeCan you solve this real interview question? Trapping Rain Water - Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it can trap after raining. Example 1: [https://assets.leetcode.com/uplleetcode.com이전에 백준에 빗물트래핑? 이라는 비슷한 문제가 있었던거 같은데 이 문제에서 따왔나 싶네요..