- Today
- Total
목록전체 글 (384)
작심삼일
문제 링크: 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..
문제 링크: https://leetcode.com/problems/valid-sudoku/ 문제 Determine if a 9 x 9 Sudoku board is valid. Only the filled cells need to be validated according to the following rules: Each row must contain the digits 1-9 without repetition. Each column must contain the digits 1-9 without repetition. Each of the nine 3 x 3 sub-boxes of the grid must contain the digits 1-9 without repetition. Note: A Sudok..
문제 링크: https://leetcode.com/problems/nearest-exit-from-entrance-in-maze/ 문제 You are given an m x n matrix maze (0-indexed) with empty cells (represented as '.') and walls (represented as '+'). You are also given the entrance of the maze, where entrance = [entrancerow, entrancecol] denotes the row and column of the cell you are initially standing at. In one step, you can move one cell up, down, l..
문제 링크: https://leetcode.com/problems/rectangle-area/ 문제 Given the coordinates of two rectilinear rectangles in a 2D plane, return the total area covered by the two rectangles. The first rectangle is defined by its bottom-left corner (ax1, ay1) and its top-right corner (ax2, ay2). The second rectangle is defined by its bottom-left corner (bx1, by1) and its top-right corner (bx2, by2). 조건 $-10^4$
문제 링크: https://leetcode.com/problems/guess-number-higher-or-lower/ 문제 We are playing the Guess Game. The game is as follows: I pick a number from 1 to n. You have to guess which number I picked. Every time you guess wrong, I will tell you whether the number I picked is higher or lower than your guess. You call a pre-defined API int guess(int num), which returns three possible results: -1: Your g..