描述
Given an array of integers, find two numbers such that they add up to a specific target number.
The function twoSum should return indices of the tw
...
描述
Given an unsorted array of integers, find the length of the longest consecutive elements sequence.
For example,Given [100, 4, 200, 1, 3, 2],The lon
...
描述
There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity
...
描述
Follow up for “Search in Rotated Sorted Array”:What if duplicates are allowed?
Would this affect the run-time complexity? How and why?
Write a func
...
描述
Suppose a sorted array is rotated at some pivot unknown to you beforehand.
(i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2).
You are given a target
...
描述
Follow up for “Remove Duplicates”:What if duplicates are allowed at most twice?
For example,Given sorted array nums = [1,1,1,2,2,3],
Your function
...
描述
Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length.
Do not allocate extra space
...
猪肉卷
我见过你们人类难以置信的事,我见过太空飞船在猎户星座的边缘被击中,燃起熊熊火光。我见过C射线,划过“唐怀瑟之门”那幽暗的宇宙空间。然而所有的这些时刻都将消失在时间里,就像……泪水……消失在雨中一样。……哎这炸酱面该下锅了吧!?
千层面$ E = mc^2 $
披萨1234567891011
...