Contains Duplicate Given an integer array nums, return true if any value appears at least twice in the array, and return false if every element is di
💡 Valid Palindrome A phrase is a palindrome if, after converting all uppercase letters into lowercase letters and removing all non-alphanumeric char
You are given an array prices where prices\[i] is the price of a given stock on the ith day.You want to maximize your profit by choosing a single day
💡 Valid Parentheses Given a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An inp
There is an integer array nums sorted in ascending order (with distinct values).Prior to being passed to your function, nums is possibly rotated at an
You are given the heads of two sorted linked lists list1 and list2.Merge the two lists in a one sorted list. The list should be made by splicing toget
💡 Maximum Depth of Binary Tree Given the root of a binary tree, return its maximum depth. A binary tree's maximum depth is the number of nodes alon
💡 Number of Island Given an m x n 2D binary grid grid which represents a map of '1's (land) and '0's (water), return the number of islands. An isla
💡 Climbing Stairs 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 distin
💡 Subsets Given an integer array nums of unique elements, return all possible subsets. The solution set must not contain duplicate subsets. Return
number sequence가 인풋으로 들어온다.해당 sequence에서 한개의 숫자만 지웠을때 strictly increasing이 될 수 있는지 확인한다💡 현재 숫자가 이전숫자보다 작을 때: drop할 숫자를 일단 찾았다1\. 현재 숫자가 전전숫자보다 크다면 이전
괄호 안의 string을 reverse하여 리턴해주는 문제For inputString = "foo(bar(baz))blim", the output should besolution(inputString) = "foobazrabblim".Because "foo(bar(ba
한쌍의 숫자만 swap해서 vector a 와 b 가 같아질 수 있는지 확인한다일단 다른게 몇개인지 세고 diffsort를 해서 두 vector가 같아졌는지 확인한다! 만약 같아졌고 diff가 딱 2개였다면 한쌍을 swap 가능하다는 뜻으로 true를 리턴한다
matrix가 주어지면 space O(1)으로 90도 시계방향으로 회전한다
Two Pointers: Fast-Slow
The Skyline ProblemRange Sum Query - MutableCount of Smaller Numbers After SelfCount of Range SumReverse PairsNumber of Longest Increasing Subsequence
Minimize Malware SpreadMinimize Malware Spread IICritical Connections in a NetworkMinimum Number of Days to Disconnect Island
Longest Consecutive SequenceGraph Valid TreeNumber of Islands IIData Stream as Disjoint IntervalsNumber of ProvincesNumber of Distinct Islands IIAccou
Ugly Number IISoup ServingsRace CarNew 21 GameSuper Egg DropLeast Operators to Express NumberLargest Multiple of ThreeAirplane Seat Assignment Probabi
Unique Binary Search TreesBurst BalloonsGuess Number Higher or Lower IIRemove BoxesMinimum Cost to Merge StonesMinimum Score Triangulation of PolygonM
Can I WinStickers to Spell WordPartition to K Equal Sum SubsetsShortest Path Visiting All NodesSmallest Sufficient TeamMaximum Students Taking ExamNum
Burst BalloonsGuess Number Higher or Lower IIArithmetic SlicesPredict the WinnerRemove BoxesPalindromic SubstringsStrange PrinterStone GameValid Permu
TriangleBest Time to Buy and Sell Stock IVCreate Maximum NumberCombination Sum IVFrog JumpSplit Array Largest SumFreedom TrailOut of Boundary PathsKni
Non-negative Integers without Consecutive OnesNumbers At Most N Given Digit SetNumbers With Repeated Digits