摘要:
There are n oranges in the kitchen and you decided to eat some of these oranges every day as follows: Eat one orange. If the number of remaining orang 阅读全文
摘要:
Given two strings s and t, return true if they are both one edit distance apart, otherwise return false. A string s is said to be one distance apart f 阅读全文
摘要:
Given a 2D grid of size m x n and an integer k. You need to shift the grid k times. In one shift operation: Element at grid[i][j] moves to grid[i][j + 阅读全文
摘要:
There is a brick wall in front of you. The wall is rectangular and has several rows of bricks. The bricks have the same height but different width. Yo 阅读全文
摘要:
Given the root of an n-ary tree, return the postorder traversal of its nodes' values. Nary-Tree input serialization is represented in their level orde 阅读全文
摘要:
168. Excel Sheet Column Title Given an integer columnNumber, return its corresponding column title as it appears in an Excel sheet. For example: A -> 阅读全文
摘要:
Give a string s, count the number of non-empty (contiguous) substrings that have the same number of 0's and 1's, and all the 0's and all the 1's in th 阅读全文
摘要:
Given the root of a tree, you are asked to find the most frequent subtree sum. The subtree sum of a node is defined as the sum of all the node values 阅读全文
摘要:
You have a lock in front of you with 4 circular wheels. Each wheel has 10 slots: '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'. The wheels can rota 阅读全文
摘要:
A set of real numbers can be represented as the union of several disjoint intervals, where each interval is in the form [a, b). A real number x is in 阅读全文
摘要:
The thief has found himself a new place for his thievery again. There is only one entrance to this area, called root. Besides the root, each house has 阅读全文
摘要:
There are n different online courses numbered from 1 to n. You are given an array courses where courses[i] = [durationi, lastDayi] indicate that the i 阅读全文
摘要:
Given a stream of integers and a window size, calculate the moving average of all integers in the sliding window. Example: MovingAverage m = new Movin 阅读全文
摘要:
Design your implementation of the circular queue. The circular queue is a linear data structure in which the operations are performed based on FIFO (F 阅读全文
摘要:
You have k lists of sorted integers in ascending order. Find the smallest range that includes at least one number from each of the k lists. We define 阅读全文
摘要:
Given an integer array nums and two integers k and t, return true if there are two distinct indices i and j in the array such that abs(nums[i] - nums[ 阅读全文
摘要:
You are given two integer arrays nums1 and nums2 sorted in non-decreasing order and an integer k. Define a pair (u, v) which consists of one element f 阅读全文
摘要:
Given the root of a binary tree and an integer targetSum, return the number of paths where the sum of the values along the path equals targetSum. The 阅读全文
摘要:
Given an integer n, break it into the sum of k positive integers, where k >= 2, and maximize the product of those integers. Return the maximum product 阅读全文
摘要:
There is a ball in a maze with empty spaces (represented as 0) and walls (represented as 1). The ball can go through the empty spaces by rolling up, d 阅读全文