Home
My Technical Diary
Cancel

LeetCode - 141. Linked List Cycle

141. Linked List Cycle - easy 문제 Given head, the head of a linked list, determine if the linked list has a cycle in it. There is a cycle in a linked list if there is some node in the list that...

LeetCode - 669. Trim a Binary Search Tree

669. Trim a Binary Search Tree - medium 문제 Given the root of a binary search tree and the lowest and highest boundaries as low and high, trim the tree so that all its elements lies in [low, hig...

LeetCode - 191. Number of 1 Bits

191. Number of 1 Bits - easy 문제 Write a function that takes an unsigned integer and returns the number of ‘1’ bits it has (also known as the Hamming weight). Note: Note that in some langua...

LeetCode - 1094. Car Pooling

1094. Car Pooling - medium 문제 You are driving a vehicle that has capacity empty seats initially available for passengers. The vehicle only drives east (ie. it cannot turn around and drive west...

LeetCode - 1221. Split a String in Balanced Strings

1221. Split a String in Balanced Strings - easy 문제 Balanced strings are those who have equal quantity of ‘L’ and ‘R’ characters. Given a balanced string s split it in the maximum amount of bal...

LeetCode - 229. Majority Element II

229. Majority Element II - medium 문제 Given an integer array of size n, find all elements that appear more than ⌊ n/3 ⌋ times. 제한사항 The algorithm should run in linear time and in O(1) space...

LeetCode - 299. Bulls and Cows

299. Bulls and Cows - medium 문제 You are playing the following Bulls and Cows game with your friend: You write down a number and ask your friend to guess what the number is. Each time your frien...

LeetCode - 58. Length of Last Word

58. Length of Last Word - easy 문제 Given a string s consists of upper/lower-case alphabets and empty space characters ‘ ‘, return the length of last word (last word means the last appearing word...

LeetCode - 890. Find and Replace Pattern

890. Find and Replace Pattern - esay 문제 You have a list of words and a pattern, and you want to know which words in words matches the pattern. A word matches the pattern if there exists a perm...

LeetCode - 835. Image Overlap

835. Image Overlap - medium 문제 Two images A and B are given, represented as binary, square matrices of the same size. (A binary matrix has only 0s and 1s as values.) We translate one image ho...