算法
熔岩XXX
这个作者很懒,什么都没留下…
展开
-
【leetcode】#11 Container With Most Water【Array】【Medium】
11.Container With Most Water Givennnon-negative integersa1,a2, ...,an, where each represents a point at coordinate (i,ai).nvertical lines are drawn such that the two endpoints of lineiis ...原创 2019-03-09 16:57:30 · 193 阅读 · 0 评论 -
【leetcode】#15 3Sum【Array】【Medium】
15.3Sum Given an arraynumsofnintegers, are there elementsa,b,cinnumssuch thata+b+c= 0? Find all unique triplets in the array which gives the sum of zero. Note: The solution set mus...原创 2019-03-09 17:02:12 · 185 阅读 · 0 评论 -
【leetcode】#1 Two Sum【Hash】【Easy】
1.Two Sum Given an array of integers, returnindicesof the two numbers such that they add up to a specific target. You may assume that each input would haveexactlyone solution, and you may not u...原创 2019-03-07 21:15:50 · 185 阅读 · 0 评论 -
【leetcode】#4 Median of Two Sorted Arrays【Array】【Hard】
4.Median of Two Sorted Arrays There are two sorted arraysnums1andnums2of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+...原创 2019-03-07 21:57:05 · 170 阅读 · 0 评论 -
【leetcode】#14 Longest Common Prefix【Array】【Easy】
14.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: ["flowe...原创 2019-04-25 21:21:34 · 228 阅读 · 0 评论 -
【leetcode】#509 Fibonacci Number【Array,DP】【Easy】
509.Fibonacci Number TheFibonacci numbers, commonly denotedF(n)form a sequence, called theFibonacci sequence, such that each number is the sum of the two preceding ones, starting from0and1. T...原创 2019-04-27 19:21:45 · 205 阅读 · 0 评论 -
【leetcode】#2 Add Two Numbers【Linked List】【Medium】
2.Add Two Numbers You are given twonon-emptylinked lists representing two non-negative integers. The digits are stored inreverse orderand each of their nodes contain a single digit. Add the two ...原创 2019-04-28 19:23:52 · 257 阅读 · 0 评论