摘要:
Problem: 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 d 阅读全文
摘要:
Problem: Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array. Note:You may assume that nums1 has enough space 阅读全文
摘要:
Problem: Given an array and a value, remove all instances of that value in place and return the new length. Do not allocate extra space for another ar 阅读全文
摘要:
Problem: 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 阅读全文
摘要:
Problem: Given an array of integers where 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once. Find all the elements o 阅读全文
摘要:
Problem: Given an array of integers and an integer k, find out whether there are two distinct indices i and j in the array such that nums[i] = nums[j] 阅读全文
摘要:
Problem: Given numRows, generate the first numRows of Pascal's triangle. For example, given numRows = 5,Return Summary: 输出杨辉三角的前n行。 Solution: 方法类似于Lee 阅读全文
摘要:
Problem: Given an index k, return the kth row of the Pascal's triangle. For example, given k = 3,Return [1,3,3,1]. Note:Could you optimize your algori 阅读全文
摘要:
Problem: Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input woul 阅读全文
摘要:
Problem: Given a non-empty array of integers, return the third maximum number in this array. If it does not exist, return the maximum number. The time 阅读全文