摘要:
Description:Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lis... 阅读全文
摘要:
Description:Reverse digits of an integer.Example1:x = 123, return 321Example2:x = -123, return -321Code: 1 int reverse(int x) { 2 int p=0; 3... 阅读全文
摘要:
Description:Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices o... 阅读全文
摘要:
Description:You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes conta... 阅读全文
摘要:
Description:A robot is located at the top-left corner of amxngrid (marked 'Start' in the diagram below).The robot can only move either down or right a... 阅读全文
摘要:
Description:Given a stringsconsists of upper/lower-case alphabets and empty space characters' ', return the length of last word in the string.If the l... 阅读全文
摘要:
Description:Find the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, given the array[−2,1,... 阅读全文
摘要:
Description:You are given annxn2D matrix representing an image.Rotate the image by 90 degrees (clockwise).Follow up:Could you do this in-place?Code: 1... 阅读全文
摘要:
Description:Given a collection of numbers, return all possible permutations.For example,[1,2,3]have the following permutations:[1,2,3],[1,3,2],[2,1,3]... 阅读全文
摘要:
Description: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... 阅读全文