上一页 1 2 3 4 5 6 7 8 9 ··· 15 下一页
摘要: 303. Range Sum Query - Immutable Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive. Example: Given 阅读全文
posted @ 2016-07-17 12:34 新一代的天皇巨星 阅读(171) 评论(0) 推荐(0) 编辑
摘要: All DNA is composed of a series of nucleotides abbreviated as A, C, G, and T, for example: "ACGAATTCCG". When studying DNA, it is sometimes useful to 阅读全文
posted @ 2016-07-17 12:23 新一代的天皇巨星 阅读(145) 评论(0) 推荐(0) 编辑
摘要: Write an algorithm to determine if a number is "happy". A happy number is a number defined by the following process: Starting with any positive intege 阅读全文
posted @ 2016-07-15 13:26 新一代的天皇巨星 阅读(153) 评论(0) 推荐(0) 编辑
摘要: Given an absolute path for a file (Unix-style), simplify it. For example,path = "/home/", => "/home"path = "/a/./b/../../c/", => "/c" click to show co 阅读全文
posted @ 2016-07-15 12:47 新一代的天皇巨星 阅读(125) 评论(0) 推荐(0) 编辑
摘要: A city's skyline is the outer contour of the silhouette formed by all the buildings in that city when viewed from a distance. Now suppose you are give 阅读全文
posted @ 2016-07-13 13:42 新一代的天皇巨星 阅读(179) 评论(0) 推荐(0) 编辑
摘要: 116. Populating Next Right Pointers in Each Node Given a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode *next 阅读全文
posted @ 2016-07-12 13:32 新一代的天皇巨星 阅读(180) 评论(0) 推荐(0) 编辑
摘要: Given a positive integer n, find the least number of perfect square numbers (for example, 1, 4, 9, 16, ...) which sum to n. For example, given n = 12, 阅读全文
posted @ 2016-07-11 13:47 新一代的天皇巨星 阅读(191) 评论(0) 推荐(0) 编辑
摘要: 263. Ugly Number Write a program to check whether a given number is an ugly number. Ugly numbers are positive numbers whose prime factors only include 阅读全文
posted @ 2016-07-11 12:33 新一代的天皇巨星 阅读(200) 评论(0) 推荐(0) 编辑
摘要: 290. Word Pattern Given a pattern and a string str, find if str follows the same pattern. Here follow means a full match, such that there is a bijecti 阅读全文
posted @ 2016-07-08 13:45 新一代的天皇巨星 阅读(216) 评论(0) 推荐(0) 编辑
摘要: 11. Container With Most Water Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are 阅读全文
posted @ 2016-07-07 13:21 新一代的天皇巨星 阅读(211) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 15 下一页