摘要:
Jump Game Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents 阅读全文
posted @ 2016-05-20 21:49
Juntaran
阅读(199)
评论(0)
推荐(0)
摘要:
House Robber III The thief has found himself a new place for his thievery again. There is only one entrance to this area, called the "root." Besides t 阅读全文
posted @ 2016-05-20 21:49
Juntaran
阅读(184)
评论(0)
推荐(0)
摘要:
Find the Duplicate Number Given an array nums containing n + 1 integers where each integer is between 1 and n (inclusive), prove that at least one dup 阅读全文
posted @ 2016-05-20 12:55
Juntaran
阅读(199)
评论(0)
推荐(0)
摘要:
H-Index Given an array of citations (each citation is a non-negative integer) of a researcher, write a function to compute the researcher's h-index. A 阅读全文
posted @ 2016-05-20 12:54
Juntaran
阅读(158)
评论(0)
推荐(0)
摘要:
First Bad Version You are a product manager and currently leading a team to develop a new product. Unfortunately, the latest version of your product f 阅读全文
posted @ 2016-05-20 12:54
Juntaran
阅读(166)
评论(0)
推荐(0)
摘要:
Ugly Number II Write a program to find the n-th ugly number. Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. For example, 阅读全文
posted @ 2016-05-20 12:53
Juntaran
阅读(203)
评论(0)
推荐(0)
摘要:
Rotate Array Rotate an array of n elements to the right by k steps. For example, with n = 7 and k = 3, the array [1,2,3,4,5,6,7] is rotated to [5,6,7, 阅读全文
posted @ 2016-05-20 12:51
Juntaran
阅读(117)
评论(0)
推荐(0)
摘要:
Reverse Linked List Reverse a singly linked list. Hint: A linked list can be reversed either iteratively or recursively. Could you implement both? 阅读全文
posted @ 2016-05-20 12:51
Juntaran
阅读(177)
评论(0)
推荐(0)
摘要:
Linked List Cycle II Given a linked list, return the node where the cycle begins. If there is no cycle, return null. Note: Do not modify the linked li 阅读全文
posted @ 2016-05-20 12:50
Juntaran
阅读(211)
评论(0)
推荐(0)
摘要:
Merge Sorted Array Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array. Note: You may assume that nums1 has en 阅读全文
posted @ 2016-05-20 12:49
Juntaran
阅读(164)
评论(0)
推荐(0)
摘要:
Linked List Cycle Given a linked list, determine if it has a cycle in it. Follow up: Can you solve it without using extra space? 阅读全文
posted @ 2016-05-20 12:49
Juntaran
阅读(147)
评论(0)
推荐(0)
摘要:
Remove Duplicates from Sorted Array II Follow up for "Remove Duplicates": What if duplicates are allowed at most twice? For example, Given sorted arra 阅读全文
posted @ 2016-05-20 12:48
Juntaran
阅读(261)
评论(0)
推荐(0)
摘要:
Rotate List 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 阅读全文
posted @ 2016-05-20 12:47
Juntaran
阅读(194)
评论(0)
推荐(0)
摘要:
Sort Colors Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the 阅读全文
posted @ 2016-05-20 12:47
Juntaran
阅读(172)
评论(0)
推荐(0)
摘要:
Jump Game II Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represen 阅读全文
posted @ 2016-05-20 12:45
Juntaran
阅读(211)
评论(0)
推荐(0)
摘要:
Remove Nth Node From End of List Given a linked list, remove the nth node from the end of list and return its head. For example, Given linked list: 1- 阅读全文
posted @ 2016-05-20 12:44
Juntaran
阅读(249)
评论(0)
推荐(0)
摘要:
Remove Duplicates from Sorted Array Given a sorted array, remove the duplicates in place such that each element appear only once and return the new le 阅读全文
posted @ 2016-05-20 12:44
Juntaran
阅读(225)
评论(0)
推荐(0)
摘要:
Longest Substring Without Repeating Characters Given a string, find the length of the longest substring without repeating characters. Examples: Given 阅读全文
posted @ 2016-05-20 12:43
Juntaran
阅读(229)
评论(0)
推荐(0)