算法分析与设计
SYSU_WangLF
这个作者很懒,什么都没留下…
展开
-
算法分析与设计——LeetCode Problem.11 Container With Most Water
问题详情Given n non-negative integers a1, a2, …, an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two原创 2017-09-24 17:54:18 · 215 阅读 · 0 评论 -
算法分析与设计——LeetCode Problem.258 Add Digits
问题详情Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path.Note: You can only move either down or righ原创 2018-01-20 20:47:27 · 307 阅读 · 0 评论 -
算法分析与设计——LeetCode Problem.3 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 length is 3.Given "bbbbb", the answer is "b"...原创 2018-03-06 18:36:58 · 105 阅读 · 0 评论 -
算法分析与设计——LeetCode Problem.5 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:Input: "babad"Output: "bab"Note: "aba" is also a valid answer...原创 2018-03-09 17:09:08 · 131 阅读 · 0 评论 -
算法分析与设计——LeetCode Problem.33 Search in Rotated Sorted Array
问题详情Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand.(i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2).You are given a target value to search. If foun原创 2018-01-20 20:31:21 · 147 阅读 · 0 评论 -
算法分析与设计——LeetCode Problem.22 Generate Parentheses
问题详情Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, given n = 3, a solution set is:[ "((()))", "(()())", "(())()", "()原创 2018-01-06 22:41:48 · 141 阅读 · 0 评论 -
算法分析与设计——LeetCode Problem.2 Add Two Numbers
Add Two Numbers原创 2017-09-17 16:19:29 · 193 阅读 · 0 评论 -
算法分析与设计——LeetCode Problem.16 3Sum Closest
LeetCode Problem.16 3Sum Closest原创 2017-10-16 14:02:41 · 237 阅读 · 0 评论 -
算法分析与设计——LeetCode Problem.35 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.H原创 2017-10-19 10:38:31 · 176 阅读 · 0 评论 -
算法分析与设计——LeetCode Problem.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 algorithm should use only constant space. You ma原创 2017-11-27 22:16:51 · 148 阅读 · 0 评论 -
算法分析与设计——LeetCode Problem.617 Merge Two Binary Trees
问题详情Given two binary trees and imagine that when you put one of them to cover the other, some nodes of the two trees are overlapped while the others are not.You need to merge them into a new binary tre原创 2018-01-03 15:04:09 · 209 阅读 · 0 评论 -
算法分析与设计——LeetCode Problem.40 Combination Sum II
问题详情Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T.Each number in C may only be used once in the combinatio原创 2018-01-04 23:58:49 · 175 阅读 · 0 评论 -
算法分析与设计——LeetCode Problem.547 Friend Circles
问题详情There are N students in a class. Some of them are friends, while some are not. Their friendship is transitive in nature. For example, if A is a direct friend of B, and B is a direct friend of原创 2018-01-05 13:02:14 · 402 阅读 · 0 评论 -
算法分析与设计——LeetCode Problem.46 Permutations
问题详情Given a collection of distinct numbers, return all possible permutations.For example,[1,2,3] have the following permutations:[ [1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1,2], [原创 2018-01-06 12:49:16 · 181 阅读 · 0 评论 -
算法分析与设计——LeetCode Problem.451 Sort Characters By Frequency
问题详情Given a string, sort it in decreasing order based on the frequency of characters.Example 1:Input:"tree"Output:"eert"Explanation:'e' appears twice while 'r' and 't' both appear onc原创 2018-01-06 13:30:44 · 144 阅读 · 0 评论 -
算法分析与设计——LeetCode Problem.598 Range Addition II
问题详情Given an m * n matrix M initialized with all 0’s and several update operations.Operations are represented by a 2D array, and each operation is represented by an array with two positive integer原创 2018-01-06 23:20:53 · 277 阅读 · 0 评论 -
算法分析与设计——LeetCode Problem.1 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 may not use t...原创 2018-03-05 12:13:24 · 168 阅读 · 0 评论