
LeetCode
shifanfashi
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
LeetCode 第二题 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 i...原创 2019-04-28 14:01:24 · 353 阅读 · 0 评论 -
LeetCode:第七题
Given a 32-bit signed integer, reverse digits of an integer. Example 1: Input: 123 Output: 321 Example 2: Input: -123 Output: -321 Example 3: Input: 120 Output: 21 Note: Assume we are dealing with an ...原创 2019-05-13 10:41:35 · 493 阅读 · 0 评论 -
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 N A P L S I I G...原创 2019-05-12 16:11:03 · 218 阅读 · 0 评论 -
leetcode:第四题:查询中位数
There are two sorted arrays nums1 and nums2 of size m and n respectively. 给定两个大小为 m 和 n 的有序数组 nums1 和 nums2 。 Find the median of the two sorted arrays. The overall run time complexity should be O(log ...原创 2019-05-07 22:52:29 · 577 阅读 · 0 评论 -
LeetCode:第十题
Given an input string (s) and a pattern §, implement regular expression matching with support for ‘.’ and ‘*’. ‘.’ Matches any single character. ‘*’ Matches zero or more of the preceding element. The ...原创 2019-05-14 09:04:17 · 669 阅读 · 0 评论 -
LeetCode:第九题
Determine whether an integer is a palindrome. An integer is a palindrome when it reads the same backward as forward. Example 1: Input: 121 Output: true Example 2: Input: -121 Output: false Explanation...原创 2019-05-13 17:45:29 · 154 阅读 · 0 评论 -
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. Example ...原创 2019-05-08 12:02:14 · 209 阅读 · 0 评论 -
LeetCode 第三题Longest Substring Without Repeating Characters
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: Input: ...原创 2019-04-29 15:55:36 · 348 阅读 · 0 评论 -
LeetCode 第一题two sum (python)
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...原创 2019-04-28 10:10:57 · 390 阅读 · 0 评论 -
LeetCode:第八题
Implement atoi which converts a string to an integer. The function first discards as many whitespace characters as necessary until the first non-whitespace character is found. Then, starting from this...原创 2019-05-13 10:44:32 · 238 阅读 · 0 评论