![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
leetcode题目
Lawe
有问题可以直接评论,欢迎指正
展开
-
【leetcode】4. Median of Two Sorted Arrays
QuestionThere 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)).Examplenums原创 2016-10-02 10:58:12 · 385 阅读 · 0 评论 -
【leetcode】3.Longest Substring Without Repeating Characters
QuestionGiven a string, find the length of the longest substring without repeating characters.ExampleGiven "abcabcbb" , the answer is"abc", which the length is 3.Given "bbbb", the answer is原创 2016-09-30 23:14:34 · 398 阅读 · 0 评论 -
【leetcode】2. Add Two Numbers
QuetionYou 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 digit. Add the two numbers and return i原创 2016-09-27 21:35:21 · 329 阅读 · 0 评论 -
【leetcode】1. Two Sum
QuestionGiven 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.ExampleGiven原创 2016-09-27 20:07:38 · 505 阅读 · 0 评论 -
【leetcode】5. Longest Palindromic Substring
QuestionGiven a string S, find the longest palindromic substring in S. You may assume that the maximum length ofS is 1000, and there exists one unique longest palindromic substring.Example原创 2016-10-03 13:48:57 · 334 阅读 · 0 评论 -
【leetcode】6. ZigZag Conversion
QuestionThe 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原创 2016-10-04 11:56:26 · 303 阅读 · 0 评论 -
【leetcode】7. Reverse Integer
QuestionThe Reverse digits of an integer.ExampleExample1: x = 123, return 321Solutionpublic class Solution { public int reverse(int x) { int temp=0; int nu原创 2016-12-25 12:32:06 · 359 阅读 · 0 评论 -
【leetcode】8. String to Integer (atoi)
QuestionImplement 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 th原创 2016-12-25 15:28:29 · 223 阅读 · 0 评论 -
【leetcode】9. Palindrome Number
QuestionDetermine whether an integer is a palindrome. Do this without extra space.Examplex = 121。Solutionpublic class Solution { public boolean isPalindrome(int x)原创 2016-12-26 13:15:05 · 248 阅读 · 0 评论