
leetcode
ARTELE
爱好计算机
展开
-
4. Median of Two Sorted Arrays --- LeetCode
不积跬步无以至千里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 should be O(log (m+n)).You may assu...原创 2019-04-11 20:34:49 · 177 阅读 · 0 评论 -
5. Longest Palindromic Substring --- leetcode
Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000.Example 1:Input: "babad"Output: "bab"Note: "aba" is also a valid answer.Exa...原创 2019-04-11 20:59:40 · 198 阅读 · 0 评论 -
2. Add Two Numbers leetcode
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return i...原创 2019-04-09 10:16:20 · 151 阅读 · 0 评论 -
3. Longest Substring Without Repeating Characters --- leetcode
Given a string, find the length of the longest substring without repeating characters.Example 1:Input: "abcabcbb"Output: 3 Explanation: The answer is "abc", with the length of 3. Example 2:...原创 2019-04-09 10:19:58 · 150 阅读 · 0 评论 -
6. ZigZag Conversion --- leetcode
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 NA P L S I I...原创 2019-04-12 21:52:15 · 243 阅读 · 0 评论