- Today
- Total
목록스터디 (246)
작심삼일
문제 링크: https://leetcode.com/problems/detect-capital/description/ 문제 We define the usage of capitals in a word to be right when one of the following cases holds: All letters in this word are capitals, like "USA". All letters in this word are not capitals, like "leetcode". Only the first letter in this word is capital, like "Google". Given a string word, return true if the usage of capitals in it ..
문제 링크: https://leetcode.com/problems/house-robber/description/ 문제 You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from robbing each of them is that adjacent houses have security systems connected and it will automatically contact the police if two adjacent houses were broken into on the same n..
문제 링크: https://leetcode.com/problems/climbing-stairs/description/ 문제 You are climbing a staircase. It takes n steps to reach the top. Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top? 조건 1
문제 링크: https://leetcode.com/problems/leaf-similar-trees/description/ 문제 Consider all the leaves of a binary tree, from left to right order, the values of those leaves form a leaf value sequence. For example, in the given tree above, the leaf value sequence is (6, 7, 4, 9, 8). Two binary trees are considered leaf-similar if their leaf value sequence is the same. Return true if and only if the two..
문제 링크: https://leetcode.com/problems/middle-of-the-linked-list/ 문제 Given the head of a singly linked list, return the middle node of the linked list. If there are two middle nodes, return the second middle node. 조건 The number of nodes in the list is in the range [1, 100]. 1 0: head = head.next half -= 1 return head
문제 링크: https://leetcode.com/problems/determine-if-string-halves-are-alike/ 문제 You are given a string s of even length. Split this string into two halves of equal lengths, and let a be the first half and b be the second half. Two strings are alike if they have the same number of vowels ('a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U'). Notice that s contains uppercase and lowercase letters. Retu..
문제 링크: https://leetcode.com/problems/unique-number-of-occurrences/ 문제 Given an array of integers arr, return true if the number of occurrences of each value in the array is unique, or false otherwise. 조건 1
문제 링크: https://leetcode.com/problems/find-players-with-zero-or-one-losses/ 문제 You are given an integer array matches where matches[i] = [$winner_i, loser_i$] indicates that the player $winner_i$ defeated player $loser_i$ in a match. Return a list answer of size 2 where: answer[0] is a list of all players that have not lost any matches. answer[1] is a list of all players that have lost exactly on..