![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
LeetCode
文章平均质量分 64
钳子夹夹夹
站在巨人的肩上。
展开
-
leetcode292 Nim Game
292. Nim GameTotal Accepted: 50767 Total Submissions: 98218 Difficulty: EasyYou are playing the following Nim Game with your friend: There is a heap of stones on the table, eac原创 2016-03-05 11:00:13 · 264 阅读 · 0 评论 -
leetcode94 Binary Tree Inorder Traversal
94. Binary Tree Inorder TraversalTotal Accepted: 113147 Total Submissions: 290357 Difficulty: MediumGiven a binary tree, return the inorder traversal of its nodes' values.For examp原创 2016-03-05 11:25:03 · 264 阅读 · 0 评论 -
leetcode206 Reverse Linked List
206. Reverse Linked ListTotal Accepted: 89431 Total Submissions: 232505 Difficulty: EasyReverse a singly linked list.click to show more hints.Hint:A linked list can be reversed原创 2016-03-06 02:54:39 · 234 阅读 · 0 评论 -
leetcode50 Pow(x, n)
50. Pow(x, n)Total Accepted: 83619 Total Submissions: 299730 Difficulty: MediumImplement pow(x, n).二分法求快速幂,时间复杂度为O(logn)。class Solution {public: double myPow(double x, int n原创 2016-03-06 03:22:25 · 423 阅读 · 0 评论 -
leetcode319 Bulb Switcher
319. Bulb SwitcherTotal Accepted: 12416 Total Submissions: 31335 Difficulty: MediumThere are n bulbs that are initially off. You first turn on all the bulbs. Then, you turn off every原创 2016-03-05 11:19:16 · 262 阅读 · 0 评论 -
leetcode52 N-Queens II
52. N-Queens IITotal Accepted: 41407 Total Submissions: 107148 Difficulty: HardFollow up for N-Queens problem.Now, instead outputting board configurations, return the total numbe原创 2016-03-06 19:42:00 · 285 阅读 · 0 评论 -
leetcode13 Roman to Integer
13. Roman to IntegerTotal Accepted: 75285 Total Submissions: 196334 Difficulty: EasyGiven a roman numeral, convert it to an integer.Input is guaranteed to be within the range from原创 2016-03-07 13:06:14 · 337 阅读 · 0 评论 -
leetcode268 Missing Number
268. Missing NumberTotal Accepted: 41297 Total Submissions: 104911 Difficulty: MediumGiven an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one that is mis原创 2016-03-05 11:20:27 · 244 阅读 · 0 评论 -
leetcode287 Find the Duplicate Number
287. Find the Duplicate NumberTotal Accepted: 21710 Total Submissions: 57132 Difficulty: HardGiven an array nums containing n + 1 integers where each integer is between 1 andn (inc原创 2016-03-07 23:00:02 · 319 阅读 · 0 评论 -
leetcode12 Integer to Roman
12. Integer to RomanTotal Accepted: 58657 Total Submissions: 154412 Difficulty: MediumGiven an integer, convert it to a roman numeral.Input is guaranteed to be within the range fro原创 2016-03-15 22:33:47 · 283 阅读 · 0 评论 -
leetcode144 Binary Tree Preorder Traversal
144. Binary Tree Preorder TraversalTotal Accepted: 110604 Total Submissions: 282561 Difficulty: MediumGiven a binary tree, return the preorder traversal of its nodes' values.For ex原创 2016-03-05 11:22:03 · 244 阅读 · 0 评论 -
leetcode169 Majority Element
169. Majority ElementTotal Accepted: 97734 Total Submissions: 242819 Difficulty: EasyGiven an array of size n, find the majority element. The majority element is the element that app原创 2016-03-05 11:17:54 · 255 阅读 · 0 评论 -
leetcode217 Contains Duplicate
217. Contains DuplicateTotal Accepted: 73841 Total Submissions: 182346 Difficulty: EasyGiven an array of integers, find if the array contains any duplicates. Your function should ret原创 2016-03-05 11:16:38 · 308 阅读 · 0 评论 -
leetcode258 Add Digits
258. Add DigitsTotal Accepted: 74723 Total Submissions: 155249 Difficulty: EasyGiven a non-negative integer num, repeatedly add all its digits until the result has only one digit.原创 2016-03-05 11:02:01 · 276 阅读 · 0 评论 -
leetcode104 Maximum Depth of Binary Tree
104. Maximum Depth of Binary TreeTotal Accepted: 126996 Total Submissions: 268431 Difficulty: EasyGiven a binary tree, find its maximum depth.The maximum depth is the number of nod原创 2016-03-05 11:03:51 · 308 阅读 · 0 评论 -
leetcode226 Invert Binary Tree
226. Invert Binary TreeTotal Accepted: 73962 Total Submissions: 167537 Difficulty: EasyInvert a binary tree. 4 / \ 2 7 / \ / \1 3 6 9to 4 /原创 2016-03-05 11:05:35 · 322 阅读 · 0 评论 -
leetcode237 Delete Node in a Linked List
237. Delete Node in a Linked ListTotal Accepted: 66681 Total Submissions: 152654 Difficulty: EasyWrite a function to delete a node (except the tail) in a singly linked list, given on原创 2016-03-05 11:06:49 · 276 阅读 · 0 评论 -
leetcode283 Move Zeroes
283. Move ZeroesTotal Accepted: 61066 Total Submissions: 140284 Difficulty: EasyGiven an array nums, write a function to move all 0's to the end of it while maintaining the relative原创 2016-03-05 11:08:10 · 275 阅读 · 0 评论 -
leetcode100 Same Tree
100. Same TreeTotal Accepted: 114518 Total Submissions: 267060 Difficulty: EasyGiven two binary trees, write a function to check if they are equal or not.Two binary trees are consi原创 2016-03-05 11:09:14 · 259 阅读 · 0 评论 -
leetcode238 Product of Array Except Self
238. Product of Array Except SelfTotal Accepted: 36710 Total Submissions: 87934 Difficulty: MediumGiven an array of n integers where n > 1, nums, return an arrayoutput such that ou原创 2016-03-05 11:10:29 · 237 阅读 · 0 评论 -
leetcode122 Best Time to Buy and Sell Stock II
122. Best Time to Buy and Sell Stock IITotal Accepted: 79414 Total Submissions: 190920 Difficulty: MediumSay you have an array for which the ith element is the price of a given stock原创 2016-03-05 11:12:05 · 297 阅读 · 0 评论 -
leetcode171 Excel Sheet Column Number
171. Excel Sheet Column NumberTotal Accepted: 68083 Total Submissions: 167730 Difficulty: EasyRelated to question Excel Sheet Column TitleGiven a column title as appear in an Exc原创 2016-03-05 11:15:17 · 251 阅读 · 0 评论 -
leetcode338 Counting Bits
338. Counting BitsTotal Accepted: 4609 Total Submissions: 8391 Difficulty: MediumGiven a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the原创 2016-03-22 16:47:21 · 477 阅读 · 0 评论