随笔分类 -  leetcode

摘要:给定一个整数数组 nums,求出数组从索引 i 到 j (i ≤ j) 范围内元素的总和,包含 i, j 两点。 示例: 给定 nums = [-2, 0, 3, -5, 2, -1],求和函数为 sumRange() sumRange(0, 2) -> 1sumRange(2, 5) -> -1s 阅读全文
posted @ 2020-07-14 00:27 papering 阅读(200) 评论(0) 推荐(0)
摘要:A/B/C代表输入的字母a/b/c的个数,均为非负整数不能连续出现三个相同的字母求给出可以组成的字长字符串的一个示例 阅读全文
posted @ 2019-07-08 16:45 papering 阅读(288) 评论(0) 推荐(0)
摘要:https://leetcode.com/problems/score-of-parentheses/solution/ (4) Score of Parentheses - LeetCode Articleshttps://leetcode.com/articles/score-of-parent 阅读全文
posted @ 2019-05-04 23:09 papering 阅读(265) 评论(0) 推荐(0)
摘要:用栈实现队列 - 力扣(LeetCode)https://leetcode-cn.com/problems/implement-queue-using-stacks/ https://leetcode.com/problems/implement-queue-using-stacks/solutio 阅读全文
posted @ 2019-05-03 23:24 papering 阅读(171) 评论(0) 推荐(0)
摘要:小结: 1、 常数时间内检索到最小元素 2、存储 存储绝对值?相对值 存储差异 3、 java-ide-debug 最小栈 - 力扣(LeetCode)https://leetcode-cn.com/problems/min-stack/ 设计一个支持 push,pop,top 操作,并能在常数时间 阅读全文
posted @ 2019-05-01 23:23 papering 阅读(2306) 评论(0) 推荐(0)
摘要:有效的括号 - LeetCode 阅读https://leetcode-cn.com/articles/valid-parentheses/ 给定一个只包括 '(',')','{','}','[',']' 的字符串,判断字符串是否有效。 有效字符串需满足: 注意空字符串可被认为是有效字符串。 让我们 阅读全文
posted @ 2019-04-30 22:43 papering 阅读(383) 评论(0) 推荐(0)
摘要:https://github.com/imhuay/Algorithm_for_Interview-Chinese/blob/master/Algorithm_for_Interview/_笔试/拼多多180722/2.字符串构造.py 阅读全文
posted @ 2019-03-14 20:13 papering 阅读(355) 评论(0) 推荐(0)
摘要:你需要判断一个 括号序列 是否是 合法的 。一个字符串s是 合法的括号序列,当且仅当以下条件同时满足: 给你n个字符串,请判断每个字符串是否是一个 合法的括号序列 输入 第一行是一个整数n,表示有n个字符串需要判断。接下来n行每行表示待判断的字符串。 n和每个字符串的长度都不超过1000。 输出 输 阅读全文
posted @ 2018-08-08 00:09 papering 阅读(837) 评论(0) 推荐(0)
摘要:【TOP】 为什么百度校招数据挖掘工程师的笔试题目是跟数据挖掘关系不大? - 研究生生活交流 - 王道论坛,专注于计算机考研的点点滴滴! http://www.cskaoyan.com/thread-244995-1-3.html 笔试时间:2014-9-20 笔试职位:机器学习/数据挖掘工程师 笔 阅读全文
posted @ 2018-06-23 10:13 papering 阅读(580) 评论(0) 推荐(0)
摘要:Write a SQL query to rank scores. If there is a tie between two scores, both should have the same ranking. Note that after a tie, the next ranking num 阅读全文
posted @ 2018-05-26 22:50 papering 阅读(312) 评论(0) 推荐(0)
摘要:换座位 - LeetCode (中国) https://leetcode-cn.com/problems/exchange-seats/description/ Mary is a teacher in a middle school and she has a table seat storing 阅读全文
posted @ 2018-05-26 00:52 papering 阅读(355) 评论(0) 推荐(0)
摘要:select case when if 的一些用法 - 马丁传奇 - 博客园 https://www.cnblogs.com/martinzhang/p/3220595.html Write a SQL query to get the second highest salary from the  阅读全文
posted @ 2018-05-25 19:47 papering 阅读(285) 评论(0) 推荐(0)
摘要:无重复字符的最长子串 - LeetCode (中国) https://leetcode-cn.com/problems/longest-substring-without-repeating-characters/description/ 阅读全文
posted @ 2018-05-25 00:29 papering 阅读(179) 评论(0) 推荐(0)
摘要:最长公共前缀 - LeetCode (中国) https://leetcode-cn.com/problems/longest-common-prefix/description/ 阅读全文
posted @ 2018-05-24 21:19 papering 阅读(243) 评论(0) 推荐(0)