摘要:
题目:Given an array withnobjects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red,... 阅读全文
摘要:
题目:Suppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e.,0 1 2 4 5 6 7might become4 5 6 7 0 1 2).You are given a target valu... 阅读全文
摘要:
我在Github上新建了一个解答Leetcode问题的Project,大家可以参考, 目前是Java 为主,里面有leetcode上的题目,解答,还有一些基本的单元测试,方便大家起步。题目:Given an array of integers, find two numbers such that ... 阅读全文
摘要:
题目:Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters... 阅读全文
摘要:
题目:Givennnon-negative integersa1,a2, ...,an, where each represents a point at coordinate (i,ai).nvertical lines are drawn such that the two endpoints ... 阅读全文
摘要:
我在Github上新建了一个解答Leetcode问题的Project,大家可以参考, 目前是Java 为主,里面有leetcode上的题目,解答,还有一些基本的单元测试,方便大家起步。题目:Suppose a sorted array is rotated at some pivot unknown... 阅读全文
摘要:
我在Github上新建了一个解答Leetcode问题的Project,大家可以参考, 目前是Java 为主,里面有leetcode上的题目,解答,还有一些基本的单元测试,方便大家起步。题目:Given two sorted integer arrays A and B, merge B into A... 阅读全文
摘要:
题目:Given an array and a value, remove all instances of that value in place and return the new length.The order of elements can be changed. It doesn't ... 阅读全文
摘要:
题目:Given a sorted array, remove the duplicates in place such that each element appear onlyonceand return the new length.Do not allocate extra space fo... 阅读全文
摘要:
题目: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... 阅读全文