Home
My Technical Diary
Cancel

LeetCode - 289. Game of Life

289. Game of Life - medium 문제 According to the Wikipedia’s article: “The Game of Life, also known simply as Life, is a cellular automaton devised by the British mathematician John Horton Conway...

LeetCode - 283. Move Zeroes

283. Move Zeroes - easy 문제 Given an array nums, write a function to move all 0’s to the end of it while maintaining the relative order of the non-zero elements. 제한사항 You must do this in-pla...

LeetCode - 279. Perfect Squares

279. Perfect Squares - medium 문제 Given a positive integer n, find the least number of perfect square numbers (for example, 1, 4, 9, 16, …) which sum to n. 제한사항 입출력 예 Example 1: Input: n = 12...

LeetCode - 230. Kth Smallest Element in a BST

230. Kth Smallest Element in a BST - medium 문제 Given a binary search tree, write a function kthSmallest to find the kth smallest element in it. 제한사항 You may assume k is always valid, 1 ≤ k ...

LeetCode - 22. Generate Parentheses

22. Generate Parentheses - medium 문제 Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. For example, given n = 3, a solution set is: [ "(...

LeetCode - 215. Kth Largest Element in an Array

215. Kth Largest Element in an Array - medium 문제 Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element. 제...

LeetCode - 142. Linked List Cycle II

142. Linked List Cycle II - medium 문제 Given a linked list, return the node where the cycle begins. If there is no cycle, return null. To represent a cycle in the given linked list, we use an i...

LeetCode - 1315. Sum of Nodes with Even-Valued Grandparent

1315. Sum of Nodes with Even-Valued Grandparent - medium 문제 Given a binary tree, return the sum of values of nodes with even-valued grandparent. (A grandparent of a node is the parent of its p...

LeetCode - 1277. Count Square Submatrices with All Ones

1277. Count Square Submatrices with All Ones - medium 문제 Given a m * n matrix of ones and zeros, return how many square submatrices have all ones. 제한사항 1 <= arr.length <= 300 1 <...

LeetCode - 1207. Unique Number of Occurrences

1207. Unique Number of Occurrences - easy 문제 Given an array of integers arr, write a function that returns true if and only if the number of occurrences of each value in the array is unique. 제...