编程练习
彩笔程序猿zxxxx
这个作者很懒,什么都没留下…
展开
-
LeetCode【4】Median of Two Sorted Arrays
题目: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)).Example 1:nums1 = [1, 3]num原创 2017-09-06 00:13:22 · 212 阅读 · 0 评论 -
LeetCode【5】Longest Palindromic Substring
题目:Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000. exampleInput: "babad"Output: "bab"Note: "aba" is also a valid answer.即给出一个字符串S,找原创 2017-09-06 00:09:28 · 200 阅读 · 0 评论 -
LeetCode【3】Longest Substring Without Repeating Characters
题目Given a string, find the length of the longest substring without repeating characters. Examples: Given “abcabcbb”, the answer is “abc”, which the length is 3. Given “bbbbb”, the answer is “b”, wit原创 2017-09-01 00:15:05 · 200 阅读 · 0 评论 -
LeetCode【2】-Add Two Numbers
题目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原创 2017-08-31 00:05:14 · 149 阅读 · 0 评论 -
LeetCode【1】-Two Sum JAVA
题目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 have exactly one solution, and you may not use the same e原创 2017-08-29 23:44:14 · 235 阅读 · 0 评论