leetcode
pengjh3
这个作者很懒,什么都没留下…
展开
-
Remove Nth Node From End of List
题目: Given a linked list, remove the nth node from the end of list and return its head. For example, Given linked list: 1->2->3->4->5, and n = 2. After removing the second node from the原创 2015-07-18 10:52:10 · 288 阅读 · 0 评论 -
ZigZag Conversion
题目: 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 font for better legibility) P A H N A P L S原创 2015-07-16 19:38:23 · 300 阅读 · 0 评论 -
Merge Two Sorted Lists
题目: 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. 题意: 合并两个已经有顺序的链表为一个链表,新的链表也要按照顺序排列。 解原创 2015-07-18 14:24:10 · 418 阅读 · 0 评论 -
Valid Parentheses
题目: Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. The brackets must close in the correct order, "()" and "()[]原创 2015-07-18 11:24:17 · 266 阅读 · 0 评论 -
Reverse Integer
题目: Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = -123, return -321 Have you thought about this? Here are some good questions to ask before coding. Bonus points fo原创 2015-07-16 20:20:10 · 214 阅读 · 0 评论 -
1 Two Sum
题目: 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 two numbers such that they add up to the ta原创 2015-09-13 21:19:14 · 305 阅读 · 0 评论