LeetCode
_May
爱做梦的渺小
展开
-
LeetCode 6. ZigZag Conversion
Description: 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原创 2017-08-07 20:56:17 · 241 阅读 · 0 评论 -
LeetCode 3. Longest Substring Without Repeating Characters
Description: Given a string, find the length of the longest substring without repeating characters. For example: Given “pwwkew”, the answer is “wke”, with the length of 3. Note that the answ原创 2017-08-07 19:11:14 · 308 阅读 · 0 评论 -
LeetCode 214. Shortest Palindrome
Description: Given a string S, you are allowed to convert it to a palindrome by adding characters in front of it. Find and return the shortest palindrome you can find by performing this transformati原创 2017-08-07 18:44:23 · 440 阅读 · 0 评论 -
LeetCode 7. Reverse Integer
Description: 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. B原创 2017-08-07 22:37:29 · 320 阅读 · 0 评论 -
LeetCode 8. String to Integer (atoi)
Description: Implement atoi to convert a string to an integer. Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the po原创 2017-08-11 14:15:19 · 413 阅读 · 0 评论 -
LeetCode 92. Reverse Linked List II
Description: Reverse a linked list from position m to n. Do it in-place and in one-pass. For example: Given 1->2->3->4->5->NULL, m = 2 and n = 4, return 1->4->3->2->5->NULL. Note: Given原创 2017-08-11 21:22:39 · 284 阅读 · 0 评论