07 2016 档案

摘要:137. Single Number II Total Accepted: 91077 Total Submissions: 235653 Difficulty: Medium Given an array of integers, every element appears three times 阅读全文
posted @ 2016-07-31 22:01 Deribs4 阅读(213) 评论(0) 推荐(0)
摘要:136. Single Number Total Accepted: 140971 Total Submissions: 276396 Difficulty: Medium Given an array of integers, every element appears twice except 阅读全文
posted @ 2016-07-31 10:13 Deribs4 阅读(140) 评论(0) 推荐(0)
摘要:268. Missing Number Total Accepted: 62408 Total Submissions: 150160 Difficulty: Medium Given an array containing n distinct numbers taken from 0, 1, 2 阅读全文
posted @ 2016-07-30 17:37 Deribs4 阅读(184) 评论(0) 推荐(0)
摘要:190. Reverse Bits Total Accepted: 71291 Total Submissions: 242226 Difficulty: Easy Reverse bits of a given 32 bits unsigned integer. For example, give 阅读全文
posted @ 2016-07-30 17:17 Deribs4 阅读(172) 评论(0) 推荐(0)
摘要:191. Number of 1 Bits 191. Number of 1 Bits Total Accepted: 103908 Total Submissions: 275693 Difficulty: Easy Write a function that takes an unsigned 阅读全文
posted @ 2016-07-30 10:20 Deribs4 阅读(132) 评论(0) 推荐(0)
摘要:338. Counting Bits 338. Counting Bits Total Accepted: 35688 Total Submissions: 61823 Difficulty: Medium Given a non negative integer number num. For e 阅读全文
posted @ 2016-07-30 09:55 Deribs4 阅读(236) 评论(0) 推荐(0)
摘要:377. Combination Sum IV 377. Combination Sum IV Total Accepted: 2547 Total Submissions: 6581 Difficulty: Medium Given an integer array with all positi 阅读全文
posted @ 2016-07-29 19:07 Deribs4 阅读(1024) 评论(0) 推荐(0)
摘要:70. Climbing Stairs 70. Climbing Stairs Total Accepted: 120408 Total Submissions: 321825 Difficulty: Easy You are climbing a stair case. It takes n st 阅读全文
posted @ 2016-07-29 15:50 Deribs4 阅读(286) 评论(0) 推荐(0)
摘要:228. Summary Ranges 228. Summary Ranges Total Accepted: 51769 Total Submissions: 203058 Difficulty: Medium Given a sorted integer array without duplic 阅读全文
posted @ 2016-07-29 09:13 Deribs4 阅读(178) 评论(0) 推荐(0)
摘要:17. Letter Combinations of a Phone Number 17. Letter Combinations of a Phone Number Total Accepted: 89600 Total Submissions: 300111 Difficulty: Medium 阅读全文
posted @ 2016-07-28 20:32 Deribs4 阅读(227) 评论(0) 推荐(0)
摘要:216. Combination Sum III 216. Combination Sum III Total Accepted: 38824 Total Submissions: 102089 Difficulty: Medium Find all possible combinations of 阅读全文
posted @ 2016-07-28 10:12 Deribs4 阅读(154) 评论(0) 推荐(0)
摘要:40. Combination Sum II 40. Combination Sum II Total Accepted: 76278 Total Submissions: 265535 Difficulty: Medium Given a collection of candidate numbe 阅读全文
posted @ 2016-07-27 17:15 Deribs4 阅读(347) 评论(0) 推荐(0)
摘要:39. Combination Sum 39. Combination Sum Total Accepted: 102477 Total Submissions: 316416 Difficulty: Medium Given a set of candidate numbers (C) and a 阅读全文
posted @ 2016-07-27 14:49 Deribs4 阅读(182) 评论(0) 推荐(0)
摘要:122. Best Time to Buy and Sell Stock II 122. Best Time to Buy and Sell Stock II Total Accepted: 96307 Total Submissions: 221716 Difficulty: Medium Say 阅读全文
posted @ 2016-07-27 08:58 Deribs4 阅读(135) 评论(0) 推荐(0)
摘要:337. House Robber III 337. House Robber III Total Accepted: 18475 Total Submissions: 47725 Difficulty: Medium The thief has found himself a new place 阅读全文
posted @ 2016-07-26 19:17 Deribs4 阅读(146) 评论(0) 推荐(0)
摘要:213. House Robber II 213. House Robber II Total Accepted: 33705 Total Submissions: 106420 Difficulty: Medium Note: This is an extension of House Robbe 阅读全文
posted @ 2016-07-26 18:40 Deribs4 阅读(190) 评论(0) 推荐(0)
摘要:198. House Robber 198. House Robber Total Accepted: 80861 Total Submissions: 227576 Difficulty: Easy You are a professional robber planning to rob hou 阅读全文
posted @ 2016-07-26 18:05 Deribs4 阅读(121) 评论(0) 推荐(0)
摘要:152. Maximum Product Subarray 152. Maximum Product Subarray Total Accepted: 65740 Total Submissions: 286731 Difficulty: Medium Find the contiguous sub 阅读全文
posted @ 2016-07-26 12:18 Deribs4 阅读(139) 评论(0) 推荐(0)
摘要:入门教程:https://guides.github.com/activities/hello-world/#merge 阅读全文
posted @ 2016-07-25 10:43 Deribs4 阅读(113) 评论(0) 推荐(0)
摘要:53. Maximum Subarray 53. Maximum Subarray Total Accepted: 123212 Total Submissions: 331027 Difficulty: Medium Find the contiguous subarray within an a 阅读全文
posted @ 2016-07-24 13:49 Deribs4 阅读(300) 评论(0) 推荐(0)
摘要:121. Best Time to Buy and Sell Stock 121. Best Time to Buy and Sell Stock Total Accepted: 115636 Total Submissions: 313848 Difficulty: Easy Say you ha 阅读全文
posted @ 2016-07-24 13:32 Deribs4 阅读(304) 评论(0) 推荐(0)
摘要:34. Search for a Range Total Accepted: 91630 Total Submissions: 308192 Difficulty: Medium Given a sorted array of integers, find the starting and endi 阅读全文
posted @ 2016-07-23 22:28 Deribs4 阅读(242) 评论(0) 推荐(0)
摘要:106. Construct Binary Tree from Inorder and Postorder Traversal 106. Construct Binary Tree from Inorder and Postorder Traversal Total Accepted: 60461 阅读全文
posted @ 2016-07-23 20:59 Deribs4 阅读(276) 评论(0) 推荐(0)
摘要:18. 4Sum 18. 4Sum Total Accepted: 80288 Total Submissions: 328279 Difficulty: Medium Given an array S of n integers, are there elements a, b, c, and d 阅读全文
posted @ 2016-07-23 19:45 Deribs4 阅读(169) 评论(0) 推荐(0)
摘要:15. 3Sum 15. 3Sum Total Accepted: 130571 Total Submissions: 670539 Difficulty: Medium Given an array S of n integers, are there elements a, b, c in S  阅读全文
posted @ 2016-07-23 15:39 Deribs4 阅读(206) 评论(0) 推荐(0)
摘要:16. 3Sum Closest 16. 3Sum Closest Total Accepted: 85780 Total Submissions: 289017 Difficulty: Medium Given an array S of n integers, find three intege 阅读全文
posted @ 2016-07-23 15:37 Deribs4 阅读(266) 评论(0) 推荐(0)
摘要:345. Reverse Vowels of a String 345. Reverse Vowels of a String Total Accepted: 30572 Total Submissions: 84744 Difficulty: Easy Write a function that 阅读全文
posted @ 2016-07-22 06:59 Deribs4 阅读(202) 评论(0) 推荐(0)
摘要:344. Reverse String 344. Reverse String Total Accepted: 56722 Total Submissions: 96534 Difficulty: Easy Write a function that takes a string as input 阅读全文
posted @ 2016-07-22 06:23 Deribs4 阅读(163) 评论(0) 推荐(0)
摘要:278. First Bad Version 278. First Bad Version Total Accepted: 52704 Total Submissions: 228913 Difficulty: Easy You are a product manager and currently 阅读全文
posted @ 2016-07-21 18:54 Deribs4 阅读(179) 评论(0) 推荐(0)
摘要:374. Guess Number Higher or Lower 374. Guess Number Higher or Lower Total Accepted: 7396 Total Submissions: 23391 Difficulty: Easy We are playing the 阅读全文
posted @ 2016-07-21 15:10 Deribs4 阅读(191) 评论(0) 推荐(0)
摘要:113. Path Sum II 113. Path Sum II Total Accepted: 88034 Total Submissions: 302190 Difficulty: Medium Given a binary tree and a sum, find all root-to-l 阅读全文
posted @ 2016-07-20 18:56 Deribs4 阅读(200) 评论(0) 推荐(0)
摘要:257. Binary Tree Paths 257. Binary Tree Paths Total Accepted: 56430 Total Submissions: 185972 Difficulty: Easy Given a binary tree, return all root-to 阅读全文
posted @ 2016-07-20 18:28 Deribs4 阅读(243) 评论(0) 推荐(0)
摘要:112. Path Sum 112. Path Sum Total Accepted: 112241 Total Submissions: 352808 Difficulty: Easy Given a binary tree and a sum, determine if the tree has 阅读全文
posted @ 2016-07-20 06:50 Deribs4 阅读(172) 评论(0) 推荐(0)
摘要:1. Two Sum 1. Two Sum Total Accepted: 259837 Total Submissions: 1043139 Difficulty: Easy Given an array of integers, return indices of the two numbers 阅读全文
posted @ 2016-07-19 18:12 Deribs4 阅读(155) 评论(0) 推荐(0)
摘要:203. Remove Linked List Elements 203. Remove Linked List Elements Total Accepted: 71491 Total Submissions: 242394 Difficulty: Easy Remove all elements 阅读全文
posted @ 2016-07-17 20:40 Deribs4 阅读(151) 评论(0) 推荐(0)
摘要:283. Move Zeroes 283. Move Zeroes Total Accepted: 98144 Total Submissions: 216474 Difficulty: Easy Given an array nums, write a function to move all 0 阅读全文
posted @ 2016-07-17 20:35 Deribs4 阅读(155) 评论(0) 推荐(0)
摘要:313. Super Ugly Number 313. Super Ugly Number Total Accepted: 18129 Total Submissions: 51091 Difficulty: Medium Write a program to find the nth super 阅读全文
posted @ 2016-07-17 16:12 Deribs4 阅读(226) 评论(0) 推荐(0)
摘要:27. Remove Element 27. Remove Element Total Accepted: 129784 Total Submissions: 372225 Difficulty: Easy Given an array and a value, remove all instanc 阅读全文
posted @ 2016-07-17 15:17 Deribs4 阅读(155) 评论(0) 推荐(0)
摘要:26. Remove Duplicates from Sorted Array 26. Remove Duplicates from Sorted Array Total Accepted: 142614 Total Submissions: 418062 Difficulty: Easy Give 阅读全文
posted @ 2016-07-17 15:05 Deribs4 阅读(144) 评论(0) 推荐(0)
摘要:88. Merge Sorted Array 88. Merge Sorted Array Total Accepted: 109369 Total Submissions: 359044 Difficulty: Easy Given two sorted integer arrays nums1  阅读全文
posted @ 2016-07-17 10:23 Deribs4 阅读(165) 评论(0) 推荐(0)
摘要:264. Ugly Number II 264. Ugly Number II Total Accepted: 35338 Total Submissions: 120258 Difficulty: Medium Write a program to find the n-th ugly numbe 阅读全文
posted @ 2016-07-16 10:31 Deribs4 阅读(257) 评论(0) 推荐(0)
摘要:204. Count Primes 204. Count Primes Total Accepted: 71783 Total Submissions: 285211 Difficulty: Easy Description: Count the number of prime numbers le 阅读全文
posted @ 2016-07-16 09:06 Deribs4 阅读(206) 评论(0) 推荐(0)
摘要:263. Ugly Number 263. Ugly Number Total Accepted: 65061 Total Submissions:173755 Difficulty: Easy Write a program to check whether a given number is a 阅读全文
posted @ 2016-07-14 21:46 Deribs4 阅读(156) 评论(0) 推荐(0)
摘要:202. Happy Number 202. Happy Number Total Accepted: 78171 Total Submissions: 208635 Difficulty: Easy Write an algorithm to determine if a number is "h 阅读全文
posted @ 2016-07-14 21:37 Deribs4 阅读(261) 评论(0) 推荐(0)
摘要:258. Add Digits 258. Add Digits Total Accepted: 108804 Total Submissions: 221342 Difficulty: Easy Given a non-negative integer num, repeatedly add all 阅读全文
posted @ 2016-07-13 22:16 Deribs4 阅读(154) 评论(0) 推荐(0)
摘要:23. Merge k Sorted Lists 23. Merge k Sorted Lists Total Accepted: 92690 Total Submissions:385821 Difficulty: Hard Merge k sorted linked lists and retu 阅读全文
posted @ 2016-07-12 22:37 Deribs4 阅读(257) 评论(0) 推荐(0)
摘要:21. Merge Two Sorted Lists 21. Merge Two Sorted Lists Total Accepted: 138746 Total Submissions: 383218 Difficulty: Easy Merge two sorted linked lists 阅读全文
posted @ 2016-07-12 22:05 Deribs4 阅读(224) 评论(0) 推荐(0)
摘要:371. Sum of Two Integers 371. Sum of Two Integers Total Accepted: 10773 Total Submissions:20732 Difficulty: Easy Calculate the sum of two integers a a 阅读全文
posted @ 2016-07-12 07:31 Deribs4 阅读(336) 评论(0) 推荐(0)
摘要:1. 数的原码补码转换 计算机运算中,数都是由补码表示的。正数的补码就是原码;负数的补码就是各位(包括符号位)取反,再加上1。假设数是8位的,最高位为符号位。1的补码是0x00000001,-3的补码是0xFFFFFFFD。 如果由补码转化为原数:正数不变;负数的补码是各位(包括符号位)取反,再加上 阅读全文
posted @ 2016-07-11 22:48 Deribs4 阅读(817) 评论(0) 推荐(0)
摘要:373. Find K Pairs with Smallest Sums 373. Find K Pairs with Smallest Sums Total Accepted: 1453 Total Submissions: 5789 Difficulty: Medium You are give 阅读全文
posted @ 2016-07-10 18:29 Deribs4 阅读(1117) 评论(0) 推荐(0)
摘要:priority_queue本质是一个堆。 1. 头文件是#include<queue> 2. 关于priority_queue中元素的比较 模板申明带3个参数:priority_queue<Type, Container, Functional>,其中Type 为数据类型,Container为保存 阅读全文
posted @ 2016-07-10 15:15 Deribs4 阅读(38447) 评论(1) 推荐(12)
摘要:110. Balanced Binary Tree 110. Balanced Binary Tree Total Accepted: 119517 Total Submissions:345415 Difficulty: Easy Given a binary tree, determine if 阅读全文
posted @ 2016-07-09 14:31 Deribs4 阅读(247) 评论(0) 推荐(0)
摘要:104. Maximum Depth of Binary Tree 104. Maximum Depth of Binary Tree Total Accepted: 157320 Total Submissions:323303 Difficulty: Easy Given a binary tr 阅读全文
posted @ 2016-07-09 09:54 Deribs4 阅读(170) 评论(0) 推荐(0)
摘要:111. Minimum Depth of Binary Tree 111. Minimum Depth of Binary Tree Total Accepted: 114343 Total Submissions:368035 Difficulty: Easy Given a binary tr 阅读全文
posted @ 2016-07-09 09:45 Deribs4 阅读(161) 评论(0) 推荐(0)
摘要:64. Minimum Path Sum 64. Minimum Path Sum Total Accepted: 76284 Total Submissions:214404 Difficulty: Medium Given a m x n grid filled with non-negativ 阅读全文
posted @ 2016-07-08 21:45 Deribs4 阅读(205) 评论(0) 推荐(0)
摘要:63. Unique Paths II 63. Unique Paths II Total Accepted: 70691 Total Submissions:237311 Difficulty: Medium Follow up for "Unique Paths": Now consider i 阅读全文
posted @ 2016-07-07 21:52 Deribs4 阅读(183) 评论(0) 推荐(0)
摘要:62. Unique Paths 62. Unique Paths Total Accepted: 93894 Total Submissions:253450 Difficulty: Medium A robot is located at the top-left corner of a m x 阅读全文
posted @ 2016-07-07 18:47 Deribs4 阅读(218) 评论(0) 推荐(0)
摘要:29. Divide Two Integers 29. Divide Two Integers Total Accepted: 70841 Total Submissions: 448890 Difficulty: Medium Divide two integers without using m 阅读全文
posted @ 2016-07-02 19:01 Deribs4 阅读(198) 评论(0) 推荐(0)
摘要:50. Pow(x, n) 50. Pow(x, n) Total Accepted: 96891 Total Submissions: 348858 Difficulty: Medium Implement pow(x, n). Implement pow(x, n). Implement pow 阅读全文
posted @ 2016-07-02 14:13 Deribs4 阅读(226) 评论(0) 推荐(0)
摘要:69. Sqrt(x) 69. Sqrt(x) Total Accepted: 99997 Total Submissions: 388728 Difficulty: Medium Implement int sqrt(int x). Compute and return the square ro 阅读全文
posted @ 2016-07-02 10:51 Deribs4 阅读(237) 评论(0) 推荐(0)
摘要:238. Product of Array Except Self Total Accepted: 51070 Total Submissions: 116543 Difficulty: Medium Given an array of n integers where n > 1, nums, r 阅读全文
posted @ 2016-07-01 20:25 Deribs4 阅读(183) 评论(0) 推荐(0)
摘要:103. Binary Tree Zigzag Level Order Traversal 103. Binary Tree Zigzag Level Order Traversal Total Accepted: 64518 Total Submissions: 219636 Difficulty 阅读全文
posted @ 2016-07-01 14:13 Deribs4 阅读(156) 评论(0) 推荐(0)
摘要:290. Word Pattern Total Accepted: 42115 Total Submissions: 140014 Difficulty: Easy 290. Word Pattern Given a pattern and a string str, find if str fol 阅读全文
posted @ 2016-07-01 12:03 Deribs4 阅读(244) 评论(0) 推荐(0)
摘要:205. Isomorphic Strings 205. Isomorphic Strings Total Accepted: 62899 Total Submissions: 206548 Difficulty: Easy Given two strings s and t, determine 阅读全文
posted @ 2016-07-01 10:45 Deribs4 阅读(269) 评论(0) 推荐(0)