刷题笔记
文章平均质量分 61
_RaymondWong
这个作者很懒,什么都没留下…
展开
-
leetcode.500.Keyboard Row
Given a List of words, return the words that can be typed using letters of alphabet on only one row’s of American keyboard原创 2017-07-05 14:15:35 · 218 阅读 · 0 评论 -
leetcode.566.Reshape the Matrix
DescriptionIn MATLAB, there is a very useful function called ‘reshape’, which can reshape a matrix into a new one with different size but keep its original data.原创 2017-07-05 14:32:37 · 260 阅读 · 0 评论 -
leetcode.136.Single Number
Given an array of integers, every element appears twice except for one. Find that single one.原创 2017-06-14 15:16:39 · 169 阅读 · 0 评论 -
leetcode.258.Add Digits
Given a non-negative integer num, repeatedly add all its digits until the result has only one digit.原创 2017-06-14 15:17:56 · 179 阅读 · 0 评论 -
leetcode.617.Merge Two Binary Trees
Given two binary trees and imagine that when you put one of them to cover the other, some nodes of the two trees are overlapped while the others are not.原创 2017-06-14 15:41:33 · 739 阅读 · 0 评论 -
leetcode.461.Hamming Distance
Given two integers x and y, calculate the Hamming distance.原创 2017-06-14 15:58:57 · 191 阅读 · 0 评论 -
leetcode.561.Array Partition I
Given an array of 2n integers, your task is to group these integers into n pairs of integer, say (a1, b1), (a2, b2), ..., (an, bn) which makes sum of min(ai, bi) for all i from 1 to n as large as possible.原创 2017-06-14 20:48:09 · 173 阅读 · 0 评论 -
leetcode.476.Number Complement
Given a positive integer, output its complement number. The complement strategy is to flip the bits of its binary representation.原创 2017-06-15 01:00:26 · 195 阅读 · 0 评论 -
leetcode.303.Range Sum Query - Immutable
DescriptionGiven an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive.原创 2017-06-02 21:32:36 · 158 阅读 · 0 评论 -
leetcode.70.Climbing Stairs
You are climbing a stair case. It takes n steps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top原创 2017-04-23 14:41:42 · 185 阅读 · 0 评论 -
leetcode.53.Maximum Subarray
DescriptionFind the contiguous subarray within an array (containing at least one number) which has the largest sum.原创 2017-02-25 15:47:25 · 167 阅读 · 0 评论 -
leetcode.101.Symmetric Tree
DescriptionGiven a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).原创 2017-03-12 16:13:17 · 185 阅读 · 0 评论 -
leetcode.215.Kth Largest Element in an Array
leetcode.215.Kth Largest Element in an Array Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element.原创 2017-03-04 17:26:23 · 202 阅读 · 0 评论 -
leetcode.198.House Robber
求数组中每个元素不相邻的子串的最大和原创 2017-04-08 15:52:47 · 230 阅读 · 0 评论 -
leetcode.122.Best Time to Buy and Sell Stock II
Say you have an array for which the ith element is the price of a given stock on day i.Design an algorithm to find the maximum profit.原创 2017-03-31 15:44:18 · 201 阅读 · 0 评论 -
leetcode.455.Assign Cookies
Assume you are an awesome parent and want to give your children some cookies. But, you should give each child at most one cookie. Each child i has a greed factor gi, which is the minimum siz原创 2017-03-25 15:30:04 · 185 阅读 · 0 评论 -
leetcode.107.Binary Tree Level Order Traversal II
DescriptionGiven a binary tree, return the bottom-up level order traversal of its nodes’ values. (ie, from left to right, level by level from leaf to root).原创 2017-03-15 22:54:35 · 175 阅读 · 0 评论 -
leetcode.121.Best Time to Buy and Sell Stock
DescriptionSay you have an array for which the ith element is the price of a given stock on day i.If you were only permitted to complete at most one transaction (ie, buy one and sell one share of the s原创 2017-04-17 15:52:23 · 248 阅读 · 0 评论 -
leetcode.557.Reverse Words in a String III
Given a string, you need to reverse the order of characters in each word within a sentence while still preserving whitespace and initial word order.原创 2017-06-15 13:54:32 · 323 阅读 · 0 评论