摘要: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 阅读全文
[LeetCode #5] Longest Palindromic Substring
2016-10-01 11:25 by amadis, 116 阅读, 0 推荐, 收藏, 编辑
摘要:Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longes 阅读全文
[LeetCode #4] Median of Two Sorted Arrays
2016-10-01 11:03 by amadis, 155 阅读, 0 推荐, 收藏, 编辑
摘要:There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity sh 阅读全文
[LeetCode #3] Longest Substring Without Repeating Characters
2016-09-24 22:36 by amadis, 125 阅读, 0 推荐, 收藏, 编辑
摘要:Given a string, find the length of the longest substring without repeating characters. Examples: Given "abcabcbb", the answer is "abc", which the leng 阅读全文
[LeetCode #2] Add Two Numbers
2016-09-24 09:16 by amadis, 117 阅读, 0 推荐, 收藏, 编辑
摘要:You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single 阅读全文
[LeetCode #1] Two Sum
2016-09-23 11:43 by amadis, 93 阅读, 0 推荐, 收藏, 编辑
摘要:1. Two Sum 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 wo 阅读全文