목록전체 글 (1208)
넘치게 채우기
https://leetcode.com/problems/create-binary-tree-from-descriptions/description/leetcode - Create Binary Tree From Descriptions문제 유형 : 이진트리문제 난이도 : Medium 문제You are given a 2D integer array descriptions where descriptions[i] = [parenti, childi, isLefti] indicates that parenti is the parent of childi in a binary tree of unique values. Furthermore,If isLefti == 1, then childi is the left child of ..
https://leetcode.com/problems/number-of-atoms/description/leetcode - Number of Atoms문제 유형 : 스택, 재귀, 문자열 처리문제 난이도 : Hard 문제Given a string formula representing a chemical formula, return the count of each atom.The atomic element always starts with an uppercase character, then zero or more lowercase letters, representing the name.One or more digits representing that element's count may follow if th..
https://leetcode.com/problems/robot-collisions/description/leetcode - Robot Collisions문제 유형 : 스택문제 난이도 : Hard 문제There are n 1-indexed robots, each having a position on a line, health, and movement direction.You are given 0-indexed integer arrays positions, healths, and a string directions (directions[i] is either 'L' for left or 'R' for right). All integers in positions are unique.All robots sta..
https://leetcode.com/problems/maximum-score-from-removing-substrings/leetcode - Maximum Score From Removing Substrings문제 유형 : 그리디, 스택, 슬라이딩 윈도우 문제 난이도 : Medium 문제You are given a string s and two integers x and y. You can perform two types of operations any number of times. Remove substring "ab" and gain x points. For example, when removing "ab" from "cabxbae" it becomes "cxbae". Remove substring..
https://leetcode.com/problems/reverse-substrings-between-each-pair-of-parentheses/description/leetcode - Reverse Substrings Between Each Pair of Parentheses문제 유형 : 스택문제 난이도 : Medium 문제You are given a string s that consists of lower case English letters and brackets.Reverse the strings in each pair of matching parentheses, starting from the innermost one.Your result should not contain any bracket..
https://leetcode.com/problems/crawler-log-folder/description/leetcode - Crawler Log Folder문제 유형 : 구현문제 난이도 : Easy 문제The Leetcode file system keeps a log each time some user performs a change folder operation.The operations are described below:"../" : Move to the parent folder of the current folder. (If you are already in the main folder, remain in the same folder)."./" : Remain in the same folde..
https://leetcode.com/problems/average-waiting-time/description/leetcode - Average Waiting Time문제 유형: 배열, 구현문제 난이도 : Medium 문제There is a restaurant with a single chef. You are given an array customers, where customers[i] = [arrivali, timei]:arrivali is the arrival time of the ith customer. The arrival times are sorted in non-decreasing order.timei is the time needed to prepare the order of the it..
https://leetcode.com/problems/find-the-winner-of-the-circular-game/description/leetcode - Find the Winner of the Circular Game문제 유형 : 배열문제 난이도 : Medium 문제There are n friends that are playing a game. The friends are sitting in a circle and are numbered from 1 to n in clockwise order. More formally, moving clockwise from the ith friend brings you to the (i+1)th friend for 1 nth friend brings you ..
https://leetcode.com/problems/water-bottles/description/leetcode - water bottles문제 유형 : 구현, 그리디문제 난이도 : Easy 문제There are numBottles water bottles that are initially full of water. You can exchange numExchange empty water bottles from the market with one full water bottle.The operation of drinking a full water bottle turns it into an empty bottle.Given the two integers numBottles and numExchange,..
https://leetcode.com/problems/pass-the-pillow/description/leetcode - Pass the Pillow문제 유형 : 수학, 구현문제 난이도 : Easy 문제There are n people standing in a line labeled from 1 to n. The first person in the line is holding a pillow initially. Every second, the person holding the pillow passes it to the next person standing in the line. Once the pillow reaches the end of the line, the direction changes, an..