- Today
- Total
목록스터디 (250)
작심삼일
문제 링크: https://leetcode.com/problems/find-and-replace-pattern/ 문제 Given a list of strings words and a string pattern, return a list of words[i] that match pattern. You may return the answer in any order. A word matches the pattern if there exists a permutation of letters p so that after replacing every letter x in the pattern with p(x), we get the desired word. Recall that a permutation of lette..
문제 링크: https://leetcode.com/problems/valid-anagram/ 문제 Given two strings s and t, return true if t is an anagram of s, and false otherwise. An Anagram is a word or phrase formed by rearranging the letters of a different word or phrase, typically using all the original letters exactly once. 조건 1
문제 링크: https://leetcode.com/problems/flatten-binary-tree-to-linked-list/ 문제 Given the root of a binary tree, flatten the tree into a "linked list": The "linked list" should use the same TreeNode class where the right child pointer points to the next node in the list and the left child pointer is always null. The "linked list" should be in the same order as a pre-order traversal of the binary tre..
문제 링크: https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree/ 문제 Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree. According to the definition of LCA on Wikipedia: “The lowest common ancestor is defined between two nodes p and q as the lowest node in T that has both p and q as descendants (where we allow a node to be a descendant of itself..
문제 링크: https://leetcode.com/problems/find-first-and-last-position-of-element-in-sorted-array/ 문제 Given an array of integers nums sorted in non-decreasing order, find the starting and ending position of a given target value. If target is not found in the array, return [-1, -1]. You must write an algorithm with O(log n) runtime complexity. 조건 $0$

문제 링크: https://leetcode.com/problems/partition-list/ 문제 Given the head of a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x. You should preserve the original relative order of the nodes in each of the two partitions. Example 1: 조건 The number of nodes in the list is in the range [0, 200]. -100
문제 링크: https://leetcode.com/problems/pascals-triangle/ 문제 Given an integer numRows, return the first numRows of Pascal's triangle. In Pascal's triangle, each number is the sum of the two numbers directly above it as shown: 조건 1
문제 링크: https://leetcode.com/problems/max-area-of-island/ 문제 You are given an m x n binary matrix grid. An island is a group of 1's (representing land) connected 4-directionally (horizontal or vertical.) You may assume all four edges of the grid are surrounded by water. The area of an island is the number of cells with a value 1 in the island. Return the maximum area of an island in grid. If ther..