- Today
- Total
목록스터디/코테 (223)
작심삼일
문제 링크: https://leetcode.com/problems/add-one-row-to-tree/ 문제 Given the root of a binary tree and two integers val and depth, add a row of nodes with value val at the given depth depth. Note that the root node is at depth 1. The adding rule is: Given the integer depth, for each not null tree node cur at the depth depth - 1, create two tree nodes with value val as cur's left subtree root and right..
문제 링크: https://leetcode.com/problems/path-sum/ 문제 Given the root of a binary tree and an integer targetSum, return true if the tree has a root-to-leaf path such that adding up all the values along the path equals targetSum. A leaf is a node with no children. 조건 The number of nodes in the tree is in the range [0, 5000]. -1000
문제 링크:https://leetcode.com/problems/find-k-closest-elements/ 문제 Given a sorted integer array arr, two integers k and x, return the k closest integers to x in the array. The result should also be sorted in ascending order. An integer a is closer to x than an integer b if: |a - x| < |b - x|, or |a - x| == |b - x| and a < b 조건 1
문제 링크: https://leetcode.com/problems/remove-nth-node-from-end-of-list/ 문제 Given the head of a linked list, remove the nth node from the end of the list and return its head. 조건 The number of nodes in the list is sz. 1
문제 링크: https://leetcode.com/problems/push-dominoes/ 문제 There are n dominoes in a line, and we place each domino vertically upright. In the beginning, we simultaneously push some of the dominoes either to the left or to the right. After each second, each domino that is falling to the left pushes the adjacent domino on the left. Similarly, the dominoes falling to the right push their adjacent domi..
문제 링크: https://leetcode.com/problems/satisfiability-of-equality-equations/ 문제 You are given an array of strings equations that represent relationships between variables where each string equations[i] is of length 4 and takes one of two different forms: "xi==yi" or "xi!=yi".Here, xi and yi are lowercase letters (not necessarily different) that represent one-letter variable names. Return true if i..
문제 링크: https://leetcode.com/problems/concatenation-of-consecutive-binary-numbers/ 문제 Given an integer n, return the decimal value of the binary string formed by concatenating the binary representations of 1 to n in order, modulo $10^9+7$. 조건 1