목록전체 글 (1208)
넘치게 채우기
https://leetcode.com/problems/maximum-difference-between-node-and-ancestor/description/ Maximum Difference Between Node and Ancestor - LeetCode Can you solve this real interview question? Maximum Difference Between Node and Ancestor - Given the root of a binary tree, find the maximum value v for which there exist different nodes a and b where v = |a.val - b.val| and a is an ancestor of b. A node..
자바스크립트를 이용하여 현재 내 블로그에서 보고 있는 게시글의 카테고리, 또는 보고 있는 카테고리를 사이드바에서 강조 시켜보려고 한다. 아래처럼! 우선, 글을 볼 때 강조하는 방법과, 카테고리를 볼 때 강조하는 방법이 다르다. 현재 주소에서 블로그주소/category일때, 블로그주소/entry일때의 경우를 다르게 처리해주면 된다. 카테고리를 보고 있을 때 카테고리 불러오기 카테고리를 보고 있을 때의 현재 주소를 보자. 블로그주소/category/카테고리/서브카테고리 형식으로 되어 있다. 현재 카테고리를 알아내기 위해, 현재 URL에서 가져오면 될 것 같다! const curr_path = location.pathname; // /category/PS/Leetcode location.pathname을 통해..
https://leetcode.com/problems/amount-of-time-for-binary-tree-to-be-infected/description/ Amount of Time for Binary Tree to Be Infected - LeetCodeCan you solve this real interview question? Amount of Time for Binary Tree to Be Infected - You are given the root of a binary tree with unique values, and an integer start. At minute 0, an infection starts from the node with value start. Each minute, a..
https://leetcode.com/problems/leaf-similar-trees/description/ Leaf-Similar Trees - LeetCode Can you solve this real interview question? Leaf-Similar Trees - Consider all the leaves of a binary tree, from left to right order, the values of those leaves form a leaf value sequence. [https://s3-lc-upload.s3.amazonaws.com/uploads/2018/07/16/tree.png leetcode.com leetcode - Lear-Similar Trees 문제 유형 : ..
https://leetcode.com/problems/range-sum-of-bst/description/ Range Sum of BST - LeetCode Can you solve this real interview question? Range Sum of BST - Given the root node of a binary search tree and two integers low and high, return the sum of values of all nodes with a value in the inclusive range [low, high]. Example 1: [https://assets.l leetcode.com leetcode - Range Sum of BST 문제 유형 : bfs/dfs..
https://leetcode.com/problems/arithmetic-slices-ii-subsequence/description/ Arithmetic Slices II - Subsequence - LeetCode Can you solve this real interview question? Arithmetic Slices II - Subsequence - Given an integer array nums, return the number of all the arithmetic subsequences of nums. A sequence of numbers is called arithmetic if it consists of at least three elements leetcode.com leetco..
https://leetcode.com/problems/maximum-profit-in-job-scheduling/description/ Maximum Profit in Job Scheduling - LeetCode Can you solve this real interview question? Maximum Profit in Job Scheduling - We have n jobs, where every job is scheduled to be done from startTime[i] to endTime[i], obtaining a profit of profit[i]. You're given the startTime, endTime and profit arrays, leetcode.com leetcode ..
https://leetcode.com/problems/longest-increasing-subsequence/description/ Longest Increasing Subsequence - LeetCode Can you solve this real interview question? Longest Increasing Subsequence - Given an integer array nums, return the length of the longest strictly increasing subsequence. Example 1: Input: nums = [10,9,2,5,3,7,101,18] Output: 4 Explanation: The longest leetcode.com leetcode - Long..
https://leetcode.com/problems/minimum-number-of-operations-to-make-array-empty/description/ Minimum Number of Operations to Make Array Empty - LeetCode Can you solve this real interview question? Minimum Number of Operations to Make Array Empty - You are given a 0-indexed array nums consisting of positive integers. There are two types of operations that you can apply on the array any number of t..
https://leetcode.com/problems/number-of-laser-beams-in-a-bank/description/ Number of Laser Beams in a Bank - LeetCode Can you solve this real interview question? Number of Laser Beams in a Bank - Anti-theft security devices are activated inside a bank. You are given a 0-indexed binary string array bank representing the floor plan of the bank, which is an m x n 2D matrix. leetcode.com leetcode - ..