Home
My Technical Diary
Cancel

LeetCode - 557. Reverse Words in a String III

557. Reverse Words in a String III - easy 문제 Given a string, you need to reverse the order of characters in each word within a sentence while still preserving whitespace and initial word order....

LeetCode - 347. Top K Frequent Elements

347. Top K Frequent Elements - medium 문제 Given a non-empty array of integers, return the k most frequent elements. 제한사항 You may assume k is always valid, 1 ≤ k ≤ number of unique elements....

LeetCode - 203. Remove Linked List Elements

203. Remove Linked List Elements - easy 문제 Remove all elements from a linked list of integers that have value val. 제한사항 입출력 예 Example: Input: 1->2->6->3->4->5->6, val = 6...

LeetCode - 100. Same Tree

100. Same Tree - easy 문제 Given two binary trees, write a function to check if they are the same or not. Two binary trees are considered the same if they are structurally identical and the node...

LeetCode - 190. Reverse Bits

190. Reverse Bits - easy 문제 Reverse bits of a given 32 bits unsigned integer. 제한사항 Note that in some languages such as Java, there is no unsigned integer type. In this case, both input and...

LeetCode - 15. 3Sum

15. 3Sum - medium 문제 Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero. 제한사항 ...

LeetCode - 263. Ugly Number

263. Ugly Number - easy 문제 Write a program to check whether a given number is an ugly number. Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. 제한사항 1 is typicall...

LeetCode - 66. Plus One

66. Plus One - easy 문제 Given a non-empty array of digits representing a non-negative integer, plus one to the integer. The digits are stored such that the most significant digit is at the head...

LeetCode - 463. Island Perimeter

463. Island Perimeter - easy 문제 You are given a map in form of a two-dimensional integer grid where 1 represents land and 0 represents water. Grid cells are connected horizontally/vertically (...

LeetCode - 957. Prison Cells After N Days

957. Prison Cells After N Days - medium 문제 There are 8 prison cells in a row, and each cell is either occupied or vacant. Each day, whether the cell is occupied or vacant changes according to ...