上一页 1 ··· 27 28 29 30 31 32 33 34 35 ··· 40 下一页
摘要: 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 阅读全文
posted @ 2020-07-07 01:17 墨云黑 阅读(173) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2020-07-06 02:49 墨云黑 阅读(136) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2020-07-06 02:03 墨云黑 阅读(153) 评论(0) 推荐(0) 编辑
摘要: Hamming Distance (E) 题目 The Hamming distance between two integers is the number of positions at which the corresponding bits are different. Given two 阅读全文
posted @ 2020-07-06 01:53 墨云黑 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2020-07-05 03:56 墨云黑 阅读(129) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2020-07-05 03:33 墨云黑 阅读(177) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2020-07-05 02:09 墨云黑 阅读(212) 评论(0) 推荐(0) 编辑
摘要: 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] 阅读全文
posted @ 2020-07-04 02:57 墨云黑 阅读(159) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2020-07-04 02:38 墨云黑 阅读(170) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2020-07-04 01:59 墨云黑 阅读(237) 评论(0) 推荐(0) 编辑
上一页 1 ··· 27 28 29 30 31 32 33 34 35 ··· 40 下一页