
leetcode
bestrivern
热爱计算机视觉,机器学习,算法,编程,正在不断学习中
展开
-
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 r...原创 2018-12-19 14:43:25 · 120 阅读 · 0 评论 -
Search Insert Position
Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.You may assume no duplicates in the array....原创 2018-12-23 15:03:11 · 125 阅读 · 0 评论 -
Count and Say
The count-and-say sequence is the sequence of integers with the first five terms as following:1. 12. 113. 214. 12115. 1112211 is read off as "one 1" or 11.11 is read off ...原创 2018-12-22 22:14:40 · 163 阅读 · 0 评论 -
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.Example 1:Input: "babad"Output: "bab"Note: "aba" is also a valid answer.Exa...原创 2018-12-26 20:26:08 · 131 阅读 · 0 评论 -
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.Example:Input: 1->2->4, 1->3->4Output: 1-...原创 2018-12-20 20:37:19 · 83 阅读 · 0 评论 -
Longest Common Prefix
Write a function to find the longest common prefix string amongst an array of strings.If there is no common prefix, return an empty string "".Example 1:Input: ["flower","flow","flight"]Output:...原创 2018-12-20 17:53:08 · 97 阅读 · 0 评论 -
Roman to Integer
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.Symbol ValueI 1V 5X 10L 50C 100D ...原创 2018-12-20 17:05:56 · 90 阅读 · 0 评论 -
Palindrome Number
Determine whether an integer is a palindrome. An integer is a palindrome when it reads the same backward as forward.Example 1:Input: 121Output: trueExample 2:Input: -121Output: falseExpl...原创 2018-12-20 16:04:09 · 109 阅读 · 0 评论 -
Reverse Integer
Given a 32-bit signed integer, reverse digits of an integer.Example 1:Input: 123Output: 321Example 2:Input: -123Output: -321Example 3:Input: 120Output: 21Note:Assume we are dea...原创 2018-12-20 15:34:54 · 140 阅读 · 0 评论 -
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)).You may assume nums1 and n...原创 2018-12-20 14:12:53 · 108 阅读 · 0 评论 -
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:...原创 2018-12-19 19:43:52 · 121 阅读 · 0 评论 -
leetcode学习日记
1.K-SUM问题https://blog.youkuaiyun.com/bestrivern/article/details/850546142. Add Two Numbershttps://blog.youkuaiyun.com/bestrivern/article/details/850951213.Longest Substring Without Repeating Charactersh...原创 2018-04-29 17:21:13 · 216 阅读 · 0 评论 -
Remove Duplicates from Sorted Array
Given a sorted array nums, remove the duplicates in-place such that each element appear only once and return the new length.Do not allocate extra space for another array, you must do this by modifyi...原创 2018-12-28 18:16:07 · 107 阅读 · 0 评论