摘要:
Plus One (E) 题目 Given a non-empty array of digits representing a non-negative integer, plus one to the integer. The digits are stored such that the mo 阅读全文
摘要:
Spiral Matrix II (M) 题目 Given a positive integer n, generate a square matrix filled with elements from 1 to \(n^2\) in spiral order. Example: Input: 3 阅读全文
摘要:
Length of Last Word (E) 题目 Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in t 阅读全文
摘要:
Hamming Distance (E) 题目 The Hamming distance between two integers is the number of positions at which the corresponding bits are different. Given two 阅读全文
摘要:
Valid Perfect Square (E) 题目 Given a positive integer num, write a function which returns True if num is a perfect square else False. Follow up: Do not 阅读全文
摘要:
Insert Interval (H) 题目 Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary). You may assume that th 阅读全文
摘要:
Ugly Number II (M) 题目 Write a program to find the n-th ugly number. Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. Exampl 阅读全文
摘要:
Merge Intervals (M) 题目 Given a collection of intervals, merge all overlapping intervals. Example 1: Input: [[1,3],[2,6],[8,10],[15,18]] Output: [[1,6] 阅读全文
摘要:
Jump Game (M) 题目 Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array repr 阅读全文
摘要:
Prison Cells After N Days (M) 题目 There are 8 prison cells in a row, and each cell is either occupied or vacant. Each day, whether the cell is occupied 阅读全文