细语呢喃

www.hrwhisper.me 新blog

排序:
默认
按更新时间
按访问量

推广一下新Blog www.hrwhisper.me

新博客地址:www.hrwhisper.me

2015-11-15 08:10:57

阅读数:653

评论数:1

leetcode Increasing Triplet Subsequence

leetcode Increasing Triplet Subsequence Given an unsorted array return whether an increasing subsequence of length 3 exists or not in the array. ...

2016-02-16 14:20:05

阅读数:635

评论数:0

leetcode Reconstruct Itinerary

leetcode Reconstruct Itinerary Given a list of airline tickets represented by pairs of departure and arrival airports [from, to], reconstruct th...

2016-02-06 23:34:47

阅读数:2767

评论数:1

leetcode Verify Preorder Serialization of a Binary Tree

One way to serialize a binary tree is to use pre-order traversal. When we encounter a non-null node, we record the node's value. If it is a null node...

2016-02-02 18:54:55

阅读数:1739

评论数:0

leetcode Patching Array

题意:给定一个数组nums和一个数n,求添加最少的数使得[1,n]中的每个数都可以由数组中元素和组成用known_sum表示已知的连续和为[1,known_sum),有了这个表示那就简单了: nums[i] nums[i] >  known_sum,  添加know...

2016-01-27 20:07:29

阅读数:1546

评论数:0

leetcode Longest Increasing Path in a Matrix

题意:给定一个矩阵,在里面找出最大上升路径 int dx[] = { 1 , -1, 0 , 0 }; int dy[] = { 0 , 0 , 1 , -1 }; class Solution { public: int dfs(int x, int y, const int &m...

2016-01-20 18:34:35

阅读数:1120

评论数:0

leetcode Odd Even Linked List

Given a singly linked list, group all odd nodes together followed by the even nodes. Please note here we are talking about the node number and not th...

2016-01-16 13:09:36

阅读数:485

评论数:0

leetcode Count of Range Sum

Given an integer array nums, return the number of range sums that lie in [lower, upper] inclusive. Range sum S(i, j) is defined as the sum of the ...

2016-01-11 09:48:25

阅读数:2926

评论数:0

leetcode Power of Three

Given an integer, write a function to determine if it is a power of three. Follow up: Could you do it without using any loop / recursion? 方法一: cl...

2016-01-08 14:20:22

阅读数:1226

评论数:0

leetcode Wiggle Sort II

Given an unsorted array nums, reorder it such that nums[0] nums[2] . Example: (1) Given nums = [1, 5, 1, 1, 6, 4], one possible answer is [1, 4, ...

2016-01-01 11:23:43

阅读数:2568

评论数:0

leetcode Coin Change

You are given coins of different denominations and a total amount of money amount. Write a function to compute the fewest number of coins that you ne...

2015-12-27 11:46:03

阅读数:2586

评论数:0

leetcode Create Maximum Number

Given two arrays of length m and n with digits 0-9 representing two numbers. Create the maximum number of length k  from digits of the two. The rel...

2015-12-24 09:43:13

阅读数:2013

评论数:0

leetcode Bulb Switcher

leetcode Bulb Switcher 题解 http://www.hrwhisper.me/leetcode-bulb-switcher/

2015-12-20 12:44:36

阅读数:635

评论数:0

leetcode Maximum Product of Word Lengths

Given a string array words, find the maximum value of length(word[i]) * length(word[j]) where the two words do not share common letters. You may as...

2015-12-16 09:28:16

阅读数:545

评论数:0

leetcode Remove Duplicate Letters

Given a string which contains only lowercase letters, remove duplicate letters so that every letter appear once and only once. You must make sure you...

2015-12-09 21:12:36

阅读数:1258

评论数:0

leetcode Count of Smaller Numbers After Self

You are given an integer array nums and you have to return a new counts array. The counts array has the property where counts[i] is the number of sm...

2015-12-07 07:32:15

阅读数:2248

评论数:0

leetcode Super Ugly Number

Write a program to find the nth super ugly number. Super ugly numbers are positive numbers whose all prime factors are in the given prime list prime...

2015-12-03 13:06:41

阅读数:3051

评论数:0

leetcode Burst Balloons

Given n balloons, indexed from 0 to n-1. Each balloon is painted with a number on it represented by array nums. You are asked to burst all the bal...

2015-11-30 14:52:41

阅读数:2752

评论数:0

leetcode Best Time to Buy and Sell Stock with Cooldown

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. You may com...

2015-11-27 18:17:11

阅读数:1616

评论数:0

leetcode Minimum Height Trees

For a undirected graph with tree characteristics, we can choose any node as the root. The result graph is then a rooted tree. Among all possible root...

2015-11-26 20:49:10

阅读数:2025

评论数:0

提示
确定要删除当前文章?
取消 删除
关闭
关闭