摘要: 题目: 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 spac 阅读全文
posted @ 2016-06-08 11:09 panini 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a linked list, swap every two adjacent nodes and return its head. For example,Given 1->2->3->4, you should return the list as 2->1->4->3. Yo 阅读全文
posted @ 2016-06-08 11:07 panini 阅读(110) 评论(0) 推荐(0) 编辑
摘要: 题目: 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 lists. 链接:  阅读全文
posted @ 2016-06-08 10:28 panini 阅读(106) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. The brackets must close in 阅读全文
posted @ 2016-06-08 10:14 panini 阅读(145) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a linked list, remove the nth node from the end of list and return its head. For example, Note:Given n will always be valid.Try to do this i 阅读全文
posted @ 2016-06-07 10:45 panini 阅读(159) 评论(0) 推荐(0) 编辑
摘要: 题目: Write a function to find the longest common prefix string amongst an array of strings. 链接:http://leetcode.com/problems/longest-common-prefix/ 一刷: 阅读全文
posted @ 2016-06-03 11:17 panini 阅读(215) 评论(0) 推荐(0) 编辑
摘要: 题目: Determine whether an integer is a palindrome. Do this without extra space. click to show spoilers. Some hints: Could negative integers be palindro 阅读全文
posted @ 2016-06-03 10:51 panini 阅读(191) 评论(0) 推荐(0) 编辑
摘要: 题目: Reverse digits of an integer. Example1: x = 123, return 321Example2: x = -123, return -321 Have you thought about this? Here are some good questio 阅读全文
posted @ 2016-05-31 10:58 panini 阅读(122) 评论(0) 推荐(0) 编辑
摘要: 题目: The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed f 阅读全文
posted @ 2016-05-31 05:53 panini 阅读(209) 评论(0) 推荐(0) 编辑
摘要: 题目: 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 would hav 阅读全文
posted @ 2016-05-30 22:37 panini 阅读(176) 评论(0) 推荐(0) 编辑