19. Remove Nth Node From End of List > https://leetcode.com/problems/remove-nth-node-from-end-of-list/ 문제 Given the head of a linked list, remove th
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
Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum.A subarray is
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
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
Given an integer array nums, return true if there exists a triple of indices (i, j, k) such that i < j < k and numsi < numsj < numsk. If n
Given an integer array nums, return the largest perimeter of a triangle with a non-zero area, formed from three of these lengths. If it is impossible
There is a singly-linked list head and we want to delete a node node in it.You are given the node to be deleted node. You will not be given access to
You are given the head of a linked list. Delete the middle node, and return the head of the modified linked list.The middle node of a linked list of s
The count-and-say sequence is a sequence of digit strings defined by the recursive formula:countAndSay(1) = "1"countAndSay(n) is the way you would "sa
Given an integer array nums and an integer k, return true if there are two distinct indices i and j in the array such that numsi == numsj and abs(i -
Given an integer array nums and an integer k, return true if nums has a continuous subarray of size at least two whose elements sum up to a multiple o
You are given an array of strings words. Each element of words consists of two lowercase English letters.Create the longest possible palindrome by sel
You are given a string s consisting of lowercase English letters. A duplicate removal consists of choosing two adjacent and equal letters and removing
Given the root of a complete binary tree, return the number of the nodes in the tree.According to Wikipedia, every level, except possibly the last, is
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,
Design a time-based key-value data structure that can store multiple values for the same key at different time stamps and retrieve the key's value at
A k-booking happens when k events have some non-empty intersection (i.e., there is some time that is common to all k events.)You are given some events
Design a parking system for a parking lot. The parking lot has three kinds of parking spaces: big, medium, and small, with a fixed number of slots for
Given an integer n, return the least number of perfect square numbers that sum to n.A perfect square is an integer that is the square of an integer; i
경화는 과수원에서 귤을 수확했습니다. 경화는 수확한 귤 중 'k'개를 골라 상자 하나에 담아 판매하려고 합니다. 그런데 수확한 귤의 크기가 일정하지 않아 보기에 좋지 않다고 생각한 경화는 귤을 크기별로 분류했을 때 서로 다른 종류의 수를 최소화하고 싶습니다.예를 들어,
자연수 n 개로 이루어진 중복 집합(multi set, 편의상 이후에는 "집합"으로 통칭) 중에 다음 두 조건을 만족하는 집합을 최고의 집합이라고 합니다.각 원소의 합이 S가 되는 수의 집합위 조건을 만족하면서 각 원소의 곱 이 최대가 되는 집합예를 들어서 자연수 2개
You are given an integer array matches where matchesi = winneri, loseri indicates that the player winneri defeated player loseri in a match.Return a l
Implement the RandomizedSet class:RandomizedSet() Initializes the RandomizedSet object.bool insert(int val) Inserts an item val into the set if not pr
Given the head of a singly linked list, group all the nodes with odd indices together followed by the nodes with even indices, and return the reordere