PinnedPublished inData Science & LeetCode for Kindergarten2021 每天必聽Podcasts推薦! (持續更新分享每天都會聽的七個Podcasts!!Apr 22, 20201Apr 22, 20201
Published inData Science & LeetCode for Kindergarten251. Flatten 2D VectorDesign an iterator to flatten a 2D vector. It should support the next and hasNext operations.May 31, 2023May 31, 2023
Published inData Science & LeetCode for Kindergarten324. Wiggle Sort IIGiven an integer array nums, reorder it such that nums[0] < nums[1] > nums[2] < nums[3]....May 30, 2023May 30, 2023
Published inData Science & LeetCode for Kindergarten384. Shuffle an ArrayGiven an integer array nums, design an algorithm to randomly shuffle the array. All permutations of the array should be equally likely as a…May 30, 2023May 30, 2023
Published inData Science & LeetCode for Kindergarten166. Fraction to Recurring DecimalGiven two integers representing the numerator and denominator of a fraction, return the fraction in string format.May 30, 2023May 30, 2023
Published inData Science & LeetCode for Kindergarten378. Kth Smallest Element in a Sorted MatrixGiven an n x n matrix where each of the rows and columns is sorted in ascending order, return the kth smallest element in the matrix.May 30, 2023May 30, 2023
Published inData Science & LeetCode for Kindergarten277. Find the CelebritySuppose you are at a party with n people labeled from 0 to n - 1 and among them, there may exist one celebrity. The definition of a…May 30, 2023May 30, 2023
Published inData Science & LeetCode for Kindergarten116. Populating Next Right Pointers in Each NodeYou are given a perfect binary tree where all leaves are on the same level, and every parent has two children. The binary tree has the…May 30, 2023May 30, 2023
Published inData Science & LeetCode for Kindergarten285. Inorder Successor in BSTGiven the root of a binary search tree and a node p in it, return the in-order successor of that node in the BST. If the given node has no…May 30, 2023May 30, 2023
Published inData Science & LeetCode for Kindergarten454. 4Sum IIGiven four integer arrays nums1, nums2, nums3, and nums4 all of length n, return the number of tuples (i, j, k, l) such that:May 30, 2023May 30, 2023
Published inData Science & LeetCode for Kindergarten348. Design Tic-Tac-ToeAssume the following rules are for the tic-tac-toe game on an n x n board between two players:May 30, 2023May 30, 2023
Published inData Science & LeetCode for Kindergarten163. Missing RangesYou are given an inclusive range [lower, upper] and a sorted unique integer array nums, where all elements are within the inclusive range.May 29, 2023May 29, 2023
Published inData Science & LeetCode for Kindergarten326. Power of ThreeGiven an integer n, return true if it is a power of three. Otherwise, return false.May 29, 2023May 29, 2023
Published inData Science & LeetCode for Kindergarten315. Count of Smaller Numbers After SelfGiven an integer array nums, return an integer array counts where counts[i] is the number of smaller elements to the right of nums[i].May 29, 2023May 29, 2023
Published inData Science & LeetCode for Kindergarten340. Longest Substring with At Most K Distinct CharactersGiven a string s and an integer k, return the length of the longestMay 28, 2023May 28, 2023
Published inData Science & LeetCode for Kindergarten148. Sort ListGiven the head of a linked list, return the list after sorting it in ascending order.May 27, 20231May 27, 20231
Published inData Science & LeetCode for Kindergarten8. String to Integer (atoi)Implement the myAtoi(string s) function, which converts a string to a 32-bit signed integer (similar to C/C++'s atoi function).May 26, 2023May 26, 2023
Published inData Science & LeetCode for Kindergarten308. Range Sum Query 2D — MutableGiven a 2D matrix matrix, handle multiple queries of the following types:May 26, 2023May 26, 2023
Published inData Science & LeetCode for Kindergarten395. Longest Substring with At Least K Repeating CharactersGiven a string s and an integer k, return the length of the longest substring of s such that the frequency of each character in this…May 26, 2023May 26, 2023
Published inData Science & LeetCode for Kindergarten240. Search a 2D Matrix IIWrite an efficient algorithm that searches for a value target in an m x n integer matrix matrix. This matrix has the following properties:May 25, 2023May 25, 2023