- 博客(13)
- 收藏
- 关注
原创 javascript和cpp中的自增运算符
1. javascript的++与 cpp 的++ 今天学习javascript的时候,遇到了一个很有趣的现象,和c++相同的代码,得到的却是截然不同的结果: cpp里 int main{ int a = 0; a = a++ cout<< a <<endl; return 0; } 结果为1 javascript里 <script> var a =0; a = a++; console.log(a); </script> 结果为0
2020-08-28 20:15:24 193
原创 【小白爬Leetcode332】重新安排行程 Reconstruct Itinerary
【小白爬Leetcode332】重新安排行程 Reconstruct Itinerary题目方法一 哈希表+回溯 题目 Leetcode332 medium\color{#ffa119}{medium}medium 点击进入原题链接:重新安排行程 Reconstruct Itinerary Given an integer array, your task is to find all the different possible increasing subsequences of the giv
2020-08-27 11:12:55 113
原创 【小白爬Leetcode491】递增子序列 Increasing Subsequences
【小白爬Leetcode491】递增子序列 Increasing Subsequences题目龟速方法 题目 Leetcode201 medium\color{#FF4500}{medium}medium 点击进入原题链接:数字范围按位与 Bitwise AND of Numbers Range Given an integer array, your task is to find all the different possible increasing subsequences of the g
2020-08-25 21:44:04 228
原创 【小白爬Leetcode201】数字范围按位与 Bitwise AND of Numbers Range
【小白爬Leetcode201】数字范围按位与 Bitwise AND of Numbers Range 题目思路一 挑选按位与的数字思路二 位移思路三 Brian Kernighan 算法 题目 Leetcode201 medium\color{#FF4500}{medium}medium 点击进入原题链接:数字范围按位与 Bitwise AND of Numbers Range Given a range [m, n] where 0 <= m <= n <= 2147483647
2020-08-23 11:00:45 137
原创 【小白爬Leetcode647】回文子串 Palindromic Substrings
【小白爬Leetcode647】回文子串 Palindromic Substrings 题目Manacher算法 O(n) 题目 Leetcode647 medium\color{#FF4500}{medium}medium 点击进入原题链接:回文子串 Palindromic Substrings Given a string, your task is to count how many palindromic substrings in this string. The substrings wit
2020-08-21 11:00:38 109
原创 【小白爬Leetcode5】最长回文子串 Longest Palindromic Substring
【小白爬Leetcode5】最长回文子串 Longest Palindromic Substring 题目Manacher算法 O(n) 题目 Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000. Manacher算法 O(n) Manacher算法可以在O(n) 的时间内求以每个字母为回文中心的最大回文子串的长度,然后再从这里面
2020-08-20 22:01:58 141
原创 【小白爬Leetcode547】区域和检索 - 数组可修改 Range Sum Query - Mutable
class NumArray { public: NumArray(vector<int>& nums) :_nums(nums) { if (nums.empty()) return; //initialize O(n) SegmentTree = vector<int>(4 * nums.size(), 0);//一般线段树数组的大小是线性数组的4倍 //build a segment tree SegmentTree_builder(0, 0, n
2020-08-17 17:09:20 194
原创 【小白爬Leetcode547】朋友圈 Friend Circles
【小白爬Leetcode547】朋友圈 Friend Circles 题目Discription思路一 DFS一个错误的想法小聪明,将空间复杂度降为O(1)思路二 BFS思路三 并查集 Leetcode547 medium\color{#FF4500}{medium}medium 点击进入原题链接:单词搜索II Word SearchII 题目 Discription There are N students in a class. Some of them are friends, while som
2020-08-16 14:49:06 356
原创 【小白爬Leetcode212】单词搜索II Word SearchII
【小白爬Leetcode212】单词搜索II Word SearchII 题目Discription分析思路 Trie树+DFS回溯改进: Leetcode212 hard\color{#FF0000}{hard}hard 点击进入原题链接:单词搜索II Word SearchII 相关题目:单词搜索 Word Search 【tag】 回溯搜索,字典树 题目 Discription Given a 2D board and a list of words from the dictionary, f
2020-08-12 23:25:31 244
原创 【小白爬Leetcode79】单词搜索 Word Search
【小白爬Leetcode79】单词搜索 Word Search 题目Discription解题 Leetcode79 medium\color{#FF4500}{medium}medium 点击进入原题链接:单词搜索 Word Search 相关题目:单词搜索II Word SearchII 【tag】 回溯搜索,C++ ASCII 题目 Discription Given a 2D board and a word, find if the word exists in the grid. The
2020-08-12 20:03:25 150
原创 【小白爬Leetcode322】9.1 零钱兑换 Coin Change
【小白爬Leetcode322】9.1 零钱兑换 Coin Change 题目Discription思路一 DFS实现的动态规划解法(自上而下)思路二 遍历实现的动态规划解法(自下而上) Leetcode 322 medium\color{#FF4500}{medium}medium 点击进入原题链接:零钱兑换 Coin Change 题目 Discription You are given coins of different denominations and a total amount of
2020-08-05 11:59:34 243
原创 【小白爬Leetcode42】8.5 接雨水 Trapping Rain Water
【小白爬Leetcode42】8.5 接雨水 Trapping Rain Water 题目Discription思路一 栈实现思路二 动态规划 Leetcode 42 hard\color{#FF0000}{hard}hard 点击进入原题链接:接雨水 Trapping Rain Water 题目 Discription Given n non-negative integers representing an elevation map where the width of each bar is
2020-08-01 21:56:24 849
原创 【百度前端学院学习笔记】Day9 圣杯布局和双飞翼布局
【百度前端学院学习笔记】Day9 圣杯布局和双飞翼布局圣杯布局 参考资料: In search of the Holy Grail - A list apart CSS布局 – 圣杯布局 & 双飞翼布局 其实圣杯布局跟双飞翼布局的实现,目的都是左右两栏固定宽度,中间部分自适应。在实现上有所不同。 圣杯布局 考虑这样一个DOM结构 <div id="header"></div><div id="container"> <div id="center" c
2020-08-01 11:25:17 523
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人