LeetCode Potential Thought Pitfalls
Problem | Reason | Reference |
Moving Zeroes Sort Colors |
Corner cases | |
Shortest Word Distance | Thought: 2 ptr chasing | |
Merge 2 sorted Lists Remove Linked List Elem |
Corner cases | |
Power of Four | Thought: fun bit ops | |
Pow(x, n) | int overflow | |
Rectangle Area | Thought | |
Merge Sorted Array | Thought: from the back | |
Count Primes | Corner cases | |
First Bad Version | Corner cases | |
Rotate Array | Thought: Multiple solutions | |
Counting Bits | Thought: Fun DP | |
Top K Frequent Elements | Thought: BUCKETING! | |
Isomorphic Strings | Thought: note - bidirectional | |
Excel Sheet Column Title | Thought: list first several cases | |
Bulb Switcher | Math\Brainteaser | |
Word Pattern | Corner case | |
Majority Number | Thought: counting strategy | More thoughts |
Add Digits | Math, or by samples | LC Forum |
Power of 3 | Math | LC Forum |
Factorial Trailing Zeros | Math\counting | |
Generate Parentheses | DFS fun | |
Longest Inc Path in Matrix | DFS + Memorized Search | |
Binary Tree Inorder Traversal | DFS->Iterative | LC Forum |
Reverse Words in a String | Note the copy trick! | LC Forum |
House Robber | DP: fun ! | |
Paint Fence | DP: fun ! | |
Binary Search Tree Iterator | Stack\Iterator | |
Count Numbers with Unique Digits | Math: Combinatorics | |
Combinations | Note the backtracking one | |
Min Stack | Stack. Fun | |
Integer Break | DP, and Math | |
strStr() | *KMP algo. |
LeetCode Potential Thought Pitfalls的更多相关文章
- Potential Pythonic Pitfalls
Potential Pythonic Pitfalls Monday, 11 May 2015 Table of Contents Not Knowing the Python Version Obs ...
- SPA UI-router
------------------------------------------------------------------------------------ SPA SPA(单页面应用): ...
- R数据分析:扫盲贴,什么是多重插补
好多同学跑来问,用spss的时候使用多重插补的数据集,怎么选怎么用?是不是简单的选一个做分析?今天写写这个问题. 什么时候用多重插补 首先回顾下三种缺失机制或者叫缺失类型: 上面的内容之前写过,这儿就 ...
- LeetCode 548. Split Array with Equal Sum (分割数组使得子数组的和都相同)$
Given an array with n integers, you need to find if there are triplets (i, j, k) which satisfies fol ...
- [LeetCode] Transform to Chessboard 转为棋盘
An N x N board contains only 0s and 1s. In each move, you can swap any 2 rows with each other, or an ...
- [LeetCode] 687. Longest Univalue Path_Easy tag: DFS recursive
Given a binary tree, find the length of the longest path where each node in the path has the same va ...
- Codewars, Leetcode, Hackerrank. Online Judges Reviews
http://jasonjl.me/blog/2015/03/30/practical-programming-practice-services/ Codewars, Leetcode, Hacke ...
- 【leetcode 桶排序】Maximum Gap
1.题目 Given an unsorted array, find the maximum difference between the successive elements in its sor ...
- The lesser known pitfalls of allowing file uploads on your website
These days a lot of websites allow users to upload files, but many don’t know about the unknown pitf ...
随机推荐
- ToolStrip添加自定义的DateTimePicker
直接新建一个类,代码如下: [ToolStripItemDesignerAvailability(ToolStripItemDesignerAvailability.All), DefaultEven ...
- SPSS数据分析—混合线性模型
之前介绍过的基于线性模型的方差分析,虽然扩展了方差分析的领域,但是并没有突破方差分析三个原有的假设条件,即正态性.方差齐性和独立性,这其中独立性要求较严格,我们知道方差分析的基本思想其实就是细分,将所 ...
- SPSS数据分析—重复测量差分析
多因素方差分析中,每个被试者仅接受一种实验处理,通过随机分配的方式抵消个体间差异所带来的误差,但是这种误差并没有被排除.而重复测量设计则是让每个被试接受所有的实验处理,这样我们就可以分离出个体差异所带 ...
- nodejs之process进程
虽然node对操作系统做了很多抽象的工作,但是你还是可以直接和他交互,比如和系统中已经存在的进程进行交互,创建工作子进程.node是一个用于事件循环的线程,但是你可以在这个事件循环之外创建其他的进程( ...
- Druid.io索引过程分析——时间窗,列存储,LSM树,充分利用内存,concise压缩
Druid底层不保存原始数据,而是借鉴了Apache Lucene.Apache Solr以及ElasticSearch等检索引擎的基本做法,对数据按列建立索引,最终转化为Segment,用于存储.查 ...
- 解决Ubuntu 下 vi编辑器不能使用方向键和退格键问题
转自:http://blog.csdn.net/sky101010ws/article/details/51012103 使用vi命令时,不能正常编辑文件,使用方向键时老是出现很多字母 这个问题主要是 ...
- css浮动(folat),清除浮动(clear)(另加两种清除浮动方式,总共三种清除浮动方式)
css浮动(float) float是css样式,用于设置标签的居左浮动和居右浮动,浮动后的元素不属于html文档流,需要用清除浮动把文档拽回到文档流中 浮动值: left:向左浮动 right:向右 ...
- Autofac.Configuration 3.3.0不稳定
Autofac.Configuration程序集的作用:通过配置来实现依赖注入. 示例: 1.配置内容 <configuration> <configSections> ...
- 黑马程序员——OC语言 核心语法(1)
Java培训.Android培训.iOS培训..Net培训.期待与您交流! (以下内容是对黑马苹果入学视频的个人知识点总结) (一)点语法 点语法其实本质上还是方法调用 当使用点语法时,编译器会自动展 ...
- BEGIN_TEMPLATE_MESSAGE_MAP
最近转做服务端开发,或多或少有点坑爹的感觉.目前正在恶补Linux C/C++编程,主要还是集中在Linux系统API的学习.不过也好,以后更新的内容不仅仅只有Windows了. 今天说一点简单的东西 ...