![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
算法,leetcode
文章平均质量分 80
Zarlove
这个作者很懒,什么都没留下…
展开
-
Leetcode算法学习日志-680 valid Palindrome II
Leetcode-680 Valid Palindrome II题目原文原创 2017-09-18 16:16:23 · 2452 阅读 · 0 评论 -
Leetcode算法学习日志-494 Target Sum
Leetcode 494 Target Sum题目原文You are given a list of non-negative integers, a1, a2, ..., an, and a target, S. Now you have 2 symbols+ and -. For each integer, you should choose one from + and原创 2018-02-06 10:45:50 · 459 阅读 · 0 评论 -
Leetcode算法学习日志-735 Asteroid Collision
Leetcode 735 Asteroid Collision题目原文We are given an array asteroids of integers representing asteroids in a row.For each asteroid, the absolute value represents its size, and the sign represent原创 2018-01-26 10:16:57 · 718 阅读 · 0 评论 -
Leetcode算法学习日志-748 Shortest Completing Word
Leetcode 748 Shortest Completing Word题目原文Find the minimum length word from a given dictionary words, which has all the letters from the string licensePlate. Such a word is said to complete the given原创 2018-01-17 20:47:22 · 429 阅读 · 0 评论 -
Leetcode算法学习日志-738 Monotone Increasing Digits
Leetcode 738 Monotone Increasing Digits题目原文Given a non-negative integer N, find the largest number that is less than or equal toN with monotone increasing digits.(Recall that an integer has原创 2018-01-24 11:39:58 · 378 阅读 · 0 评论 -
Leetcode算法学习日志-287 Find the Duplicate Number
Leetcode 287 Find the Duplicate Number题目原文Given an array nums containing n + 1 integers where each integer is between 1 andn (inclusive), prove that at least one duplicate number must exist. A原创 2018-01-31 10:55:58 · 403 阅读 · 0 评论 -
Leetcode算法学习日志-687 Longest Univalue Path
Leetcode 687 Longest Univalue Path题目原文Given a binary tree, find the length of the longest path where each node in the path has the same value. This path may or may not pass through the root.No原创 2018-01-14 10:11:12 · 800 阅读 · 0 评论 -
Leetcode算法学习日志-767 Reorganize String
Leetcode 767 Reorganize String题目原文Given a string S, check if the letters can be rearranged so that two characters that are adjacent to each other are not the same.If possible, output any possi原创 2018-01-22 11:35:58 · 1150 阅读 · 0 评论 -
Leetcode算法学习日志-743 Network Delay Time
Leetcode 743 Network Delay Time题目原文There are N network nodes, labelled 1 to N.Given times, a list of travel times asdirected edges times[i] = (u, v, w), where u is the source node,v is t原创 2018-01-22 11:15:03 · 794 阅读 · 0 评论 -
Leetcode算法学习日志-686 Repeated String Match
Leetcode 686 Repeated String Match题目原文Given two strings A and B, find the minimum number of times A has to be repeated such that B is a substring of it. If no such solution, return -1.For原创 2018-01-13 11:16:33 · 470 阅读 · 0 评论 -
Leetcode算法学习日志-751 IP to CIDR
Leetcode 751 IP to CIDR题目原文Given a start IP address ip and a number of ips we need to covern, return a representation of the range as a list (of smallest possible length) of CIDR blocks.A CI原创 2017-12-27 11:29:45 · 1688 阅读 · 0 评论 -
Leetcode算法学习日志-572 Subtree of Another Tree
Leetcode 572 Subtree of Another Tree题目原文Given two non-empty binary trees s andt, check whether tree t has exactly the same structure and node values with a subtree ofs. A subtree of s is a t原创 2017-12-04 20:43:39 · 336 阅读 · 0 评论 -
Leetcode算法学习日志-525 Contiguous Array
Leetcode 525 Contiguous Array题目原文Given a binary array, find the maximum length of a contiguous subarray with equal number of 0 and 1.Example 1:Input: [0,1]Output: 2Explanation: [0, 1]原创 2017-12-02 17:01:45 · 392 阅读 · 0 评论 -
Leetcode算法学习日志-78 Subsets
Leetcode 78 Subsets题目原文Given a set of distinct integers,nums, return all possible subsets (the power set).Note: The solution set must not contain duplicate subsets.For example,If nums =原创 2017-11-07 19:29:33 · 281 阅读 · 0 评论 -
Leetcode算法学习日志-144 Binary Tree Preorder Traversal
Leetcode 144 Binary Tree Preorder Traversal题目原文Given a binary tree, return the preorder traversal of its nodes' values.题意分析先根次序输出一棵树解法分析先根次序输出一棵树最常见的办法是采用递归,本题要求利用迭代的方法。要将递归转为迭代,关键是要控制迭代变量,并且注意维护一个sta...原创 2018-03-07 22:16:42 · 397 阅读 · 0 评论