LeetCode
文章平均质量分 56
BishopTylaor
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
LeetCode.7.Reverse Integer
原题链接:Reverse Integer 题目内容: 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:...原创 2018-04-10 15:04:19 · 205 阅读 · 0 评论 -
LeetCode.206.Reverse Linked List
原题链接:Reverse Linked List 题目内容: Reverse a singly linked list. Example: Input: 1->2->3->4->5->NULL Output: 5->4->3->2->1->NULL原创 2018-09-06 17:50:10 · 218 阅读 · 0 评论 -
LeetCode.19.Remove Nth Node From End of List
原题链接:Remove Nth Node From End of List 题目内容: Given a linked list, remove the n-th node from the end of list and return its head. Example: Given linked list: 1->2->3->4->5, and n = 2....原创 2018-08-29 16:54:26 · 172 阅读 · 0 评论 -
LeetCode.88.Merge Sorted Array
原题链接:Merge Sorted Array 题目内容: Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array. Note: The number of elements initialized in nums1 and nums2 are m and n r...原创 2018-05-07 17:51:00 · 217 阅读 · 0 评论 -
LeetCode.242.Valid Anagram
原题链接:Valid Anagram 题目内容: Given two strings s and t, write a function to determine if t is an anagram of s. For example, s = “anagram”, t = “nagaram”, return true. s = “rat”, t = “car”, return fa...原创 2018-03-28 19:09:41 · 208 阅读 · 0 评论 -
LeetCode.387.First Unique Character in a String
原题链接:First Unique Character in a String 题目内容: Given a string, find the first non-repeating character in it and return it’s index. If it doesn’t exist, return -1. Examples: s = “leetcode” re...原创 2018-03-28 18:07:30 · 175 阅读 · 0 评论 -
LeetCode.344.Reverse String
原题链接:Reverse String 题目内容: Write a function that takes a string as input and returns the string reversed. Example: Given s = “hello”, return “olleh”. Python class Solution(object): def...原创 2018-03-28 16:44:56 · 185 阅读 · 0 评论 -
LeetCode.326.Power of Three
原题链接:Power of Three 题目内容: Given an integer, write a function to determine if it is a power of three. Follow up: Could you do it without using any loop / recursion? Credits: Special thanks to @d...原创 2018-03-28 14:30:58 · 277 阅读 · 0 评论 -
LeetCode.204.Count Primes
原题链接:Count Primes 题目内容: Description: Count the number of prime numbers less than a non-negative number, n. Credits: Special thanks to @mithmatt for adding this problem and creating all test cases...原创 2018-03-28 11:54:27 · 184 阅读 · 0 评论 -
LeetCode.8.String to Integer (atoi)
原题链接: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 your...原创 2018-04-10 16:45:05 · 185 阅读 · 0 评论 -
LeetCode.66.Plus One
原题链接:Plus One 题目内容:Given a non-negative integer represented as a non-empty array of digits, plus one to the integer. You may assume the integer do not contain any leading zero, except the number 0 i...原创 2018-03-16 11:25:02 · 204 阅读 · 0 评论 -
LeetCode.28.Implement strStr()
原题链接:Implement strStr() 题目内容: Return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. Example 1: Input: haystack = “hello”, needle = “ll” Out...原创 2018-04-08 19:26:53 · 180 阅读 · 0 评论 -
LeetCode.14.Longest Common Prefix
原题链接:Longest Common Prefix 题目内容: Write a function to find the longest common prefix string amongst an array of strings. 找到字符列表中的最长前缀,注意[], [“”], [“a”, “a”]这样的例子 Python class Solution(object): ...原创 2018-04-07 18:32:48 · 200 阅读 · 0 评论 -
LeetCode.38.Count and Say
原题链接:Count and Say 题目内容: The count-and-say sequence is the sequence of integers with the first five terms as following: 1 11 21 1211 111221 1 is read off as “one 1” or 11. 11 i...原创 2018-03-30 19:33:27 · 173 阅读 · 0 评论 -
LeetCode.125.Valid Palindrome
原题链接:Valid Palindrome 题目内容: Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. For example, “A man, a plan, a canal: Panama” is a pa...原创 2018-03-30 19:03:15 · 163 阅读 · 0 评论 -
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, and you ma...原创 2018-03-20 18:09:49 · 182 阅读 · 0 评论 -
LeetCode.412.Fizz Buzz
原题链接:Fizz Buzz 题目内容:Write a program that outputs the string representation of numbers from 1 to n. But for multiples of three it should output “Fizz” instead of the number and for the multiples of f...原创 2018-03-23 17:46:31 · 199 阅读 · 0 评论 -
LeetCode.36.Valid Sudoku
原题链接:Valid Sudoku 题目内容:Determine if a Sudoku is valid, according to: Sudoku Puzzles - The Rules. The Sudoku board could be partially filled, where empty cells are filled with the character ‘.’. A...原创 2018-03-23 17:19:53 · 208 阅读 · 0 评论 -
LeetCode.283.Move Zeroes
原题链接:Move Zeroes 题目内容:Given an array nums, write a function to move all 0’s to the end of it while maintaining the relative order of the non-zero elements. For example, given nums = [0, 1, 0, 3, 12]...原创 2018-03-19 19:04:46 · 192 阅读 · 0 评论
分享