Given a list, rotate the list to the right by k places, where k is non-negative.
For example:
Given 1->2->3->4->5->NULL and k = 2,
return 4->5->1->2->3->NULL.
/**
* Definition for singly-linked...
分类:
其他好文 时间:
2014-10-16 16:28:32
阅读次数:
130
Given an array of non-negative integers, you are initially positioned at the first index of the array.
Each element in the array represents your maximum jump length at that position.
Determine i...
分类:
其他好文 时间:
2014-10-16 14:55:02
阅读次数:
297
Given a list, rotate the list to the right by k places, where k is non-negative.
For example:
Given 1->2->3->4->5->NULL and k = 2,
return 4->5->1->2->3->NULL.
/**
* Definition for singly-link...
分类:
其他好文 时间:
2014-10-15 16:29:21
阅读次数:
119
Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path.
Note: You can only move either down or right at...
分类:
其他好文 时间:
2014-10-15 15:13:00
阅读次数:
200
Largest Rectangle in Histogram
Total Accepted: 18582 Total
Submissions: 86792My Submissions
Given n non-negative integers representing the histogram's bar height where the width of each b...
分类:
其他好文 时间:
2014-10-14 16:38:09
阅读次数:
154
Given a non-negative number represented as an array of digits, plus one to the number.
The digits are stored such that the most significant digit is at the head of the list.
class Solution {
pub...
分类:
其他好文 时间:
2014-10-14 16:04:43
阅读次数:
154
Given a list, rotate the list to the right by k places, where k is non-negative.
For example:
Given 1->2->3->4->5->NULL and k = 2,
return 4->5->1->2->3->NULL.
Solution:
/**
* Definition for ...
分类:
其他好文 时间:
2014-10-12 13:33:18
阅读次数:
161
Given a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the most significant digit is at...
分类:
其他好文 时间:
2014-10-12 13:29:18
阅读次数:
160
Given n non-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in the histogram.
Above is a histogram where width o...
分类:
其他好文 时间:
2014-10-11 17:54:45
阅读次数:
147
[leetcode]Given a non-negative integer n representing the total number of bits in the code, print the sequence of gray code. A gray code sequence must begin with 0....
分类:
其他好文 时间:
2014-10-10 15:07:44
阅读次数:
167