![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
leetcode
yumodev
这个作者很懒,什么都没留下…
展开
-
Leetcode-1-Two Sum
原链接: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 would have exactly one solution.Example:Given...原创 2019-05-10 13:11:30 · 203 阅读 · 0 评论 -
Leetcode-23 Swap Nodes in Pairs (java)
24. Swap Nodes in Pairs原题目Given a linked list, swap every two adjacent nodes and return its head.For example,Given 1->2->3->4, you should return the list as 2->1->4->3.Your algo...原创 2019-05-11 21:02:45 · 270 阅读 · 0 评论 -
Leetcode-21 Merge Two Sorted Lists (java)
21. Merge Two Sorted Lists原题目Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.翻译将两个有序链表合并成一个新的链表。新的链表应该有...原创 2019-05-11 21:01:43 · 228 阅读 · 0 评论 -
Leetcode-20 Valid Parentheses
layout: posttitle: 20-Valid Parenthesescategory: leetcodetags: java, leetcode, airthmetickeywords: javadescription:20. Valid Parentheses原题目Given a string containing just the characters ‘(’, ‘...原创 2019-05-11 20:58:57 · 159 阅读 · 0 评论 -
Leetcode-19 Remove Nth Node From End of List
layout: posttitle: 19-Remove Nth Node From End of Listcategory: leetcodetags: java, leetcode, airthmetickeywords: javadescription:19. Remove Nth Node From End of List原题目Given a linked list, r...原创 2019-05-11 20:57:47 · 161 阅读 · 0 评论 -
Leetcode-14 Longest Common Prefix
14. Longest Common Prefix原题目Write a function to find the longest common prefix string amongst an array of strings.翻译编写一个方法来查找一个字符串数组中最长的公共前缀字符串。解决思路这道题目的意思是求取所有字符串的最长前缀公共字符串。采用暴力比较的方法是最简单。就是循环获...原创 2019-05-11 20:56:29 · 150 阅读 · 0 评论 -
Leetcode-13 Roman to Integer (java)
13. Roman to Integer原题目Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.题目翻译将给定的一个罗马数字字符串转换为整数假定的输入范围是1到3999.解决思路这道里面本身很简单,其实难点在于必须要明白罗...原创 2019-05-11 20:55:00 · 301 阅读 · 0 评论 -
Leetcode-9 Palindrome Number (java)
9. Palindrome Number原题目Determine whether an integer is a palindrome. Do this without extra space.Some hints:Could negative integers be palindromes? (ie, -1)If you are thinking of converting the i...原创 2019-05-10 13:56:52 · 185 阅读 · 0 评论 -
Leetcode-8 String to Integer (java)
8. String to Integer (atoi)原题目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 w...原创 2019-05-10 13:56:01 · 174 阅读 · 0 评论 -
Leetcode-7 Reverse Integer (java)
7. Reverse Integer原题目Reverse digits of an integer.Example1: x = 123, return 321Example2: x = -123, return -321Have you thought about this?Here are some good questions to ask before coding. Bonu...原创 2019-05-10 13:55:16 · 220 阅读 · 0 评论 -
Leetcode-6 ZigZag Conversion (java)
6. ZigZag Conversion原题目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 ...原创 2019-05-10 13:53:42 · 192 阅读 · 0 评论 -
Leetcode-5 Longest Palindromic Substring (java)
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, and there exists one unique longest palindromic su...原创 2019-05-10 13:52:57 · 360 阅读 · 0 评论 -
Leetcode-4 Median of Two Sorted Arrays (java)
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)...原创 2019-05-10 13:51:50 · 143 阅读 · 0 评论 -
Leetcode-4 Median of Two Sorted Arrays (java)
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)...原创 2019-05-10 13:50:38 · 270 阅读 · 0 评论 -
Leetcode-3 Longest Substring Without Repeating Characters (java,c++,javascript)
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 len...原创 2019-05-10 13:49:38 · 208 阅读 · 0 评论 -
Leetcode-2 Add Two Numbers
题目原地址原题目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 digit. Add the two numbers and return it...原创 2019-05-10 13:47:45 · 111 阅读 · 0 评论 -
Leetcode-26 Remove Duplicates from Sorted Array (java)
layout: posttitle: 26-Remove Duplicates from Sorted Arraycategory: leetcodetags: java, leetcode, airthmetickeywords: javadescription:26. Remove Duplicates from Sorted Array原题目Given a sorted a...原创 2019-05-11 21:03:59 · 402 阅读 · 0 评论