- 博客(6)
- 收藏
- 关注
原创 LeetCode-Medium-FindTheLongestPalindromeSubstring
Central Expansion method the main idea is Expanding from the center point of the Palindrome: We should iterate every center potion of possible Palindrome in the String. There are 2n - 1 points that m...
2020-02-26 18:21:14
167
原创 LeetCode-Medium:Find the longest substring without repeating char
What is a Sliding Windows? Sliding Windows actually is a range(consist of successive elements) within a array or string. Which have a “startIndex” and “endindex” to record the position of the Sliding ...
2020-02-25 23:49:22
148
原创 LeetCode-Medium-LinkedList Problem:adding to numbers which are stored in reserve linked lists.
You are given two 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 return it as a lin...
2020-02-24 23:31:43
200
原创 记录一种从n个数中取m个数进行排列的方法(0-1枚举)
摘要 将n个数字放到一个长度为n的数组中。 再生成一个长度为n的0-1数组,1代表选取该位置映射的元素,0代表不选取(1的总数等于m),通过枚举0 1的所有位置,来完成数字组合的枚举。 具体枚举逻辑: 令0-1数组所有元素都为0 令0-1数组前m个元素都为1(此时就已经代表了一种组合) 循环切换: 利用for找到该0-1数组第一个存在“1 0”的位置(即前一位置为1,后一位置为0),对调两者位置(...
2019-05-25 18:37:14
1494
原创 【算法-枚举】淘气的青蛙 自己对解题思路的梳理
问题描述与解法来源: https://www.bilibili.com/video/av10046345/?p=5 #p5 讨厌的青蛙 该问题解法:枚举 自己对解题思路的梳理: 1.该问题初看似乎很复杂,但是经过一层层分析拆解,问题的解法便显得直观了 2.在看题目的时候应该有几个部分可以把握注意: (1)、每只青蛙每次跳跃都是等距的,这代表如果我们取两个点,便可以根据他们生成一条路径(可以确定方向...
2019-04-01 23:27:46
277
原创 【算法-枚举】熄灯问题 通俗详细的解题叙述(OpenJudege-2811)
对于该问题的描述: https://www.bilibili.com/video/av10046345/?p=4 #p4熄灯问题 http://bailian.openjudge.cn/practice/2811/ #OpenJudege-2811
2019-03-31 23:42:13
4240
1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅