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 ...
随机推荐
- C#窗体 WinForm 文件操作
文件及文件夹操作 C/S:WinForm可以操作客户端文件 Client ServerB/S:浏览器服务 Brower Server 命名空间:using system .IO; 1. File类:文 ...
- ZJOI2015 一试。
虽然早就知道会是这个结果,但是看到的成绩时候还是有些忧伤,奇迹果然还是没有发生. 想了想还是应该写篇博文 纪念一下这段经历. Day0: 报道之后直接去了宾馆,然后意外的发现冬令营时候的室友wxh就住 ...
- megapix-image插件 使用Canvas压缩图片上传 解决手机端图片上传功能的问题
最近在弄微信端的公众号.订阅号的相关功能,发现原本网页上用的uploadify图片上传功能到手机端有的手机类型上就不能用了,比如iphone,至于为啥我想应该不用多说了吧(uploadify使用fla ...
- 一个null引发的错误
写程序时,发生一个unrecognized selector的错误,很显然,这是一个经典错误,运行时找不到可调用的方法. 系统提示的reason是 -[NSNull length] 错误 经过查找,原 ...
- Cache-control使用Cache-control:private学习笔记
其作用根据不同的重新浏览方式,分为以下几种情况:(1).打开新窗口值为private.no-cache.must-revalidate,那么打开新窗口访问时都会重新访问服务器.而如果指定了max-ag ...
- 绑定hosts
测试过程中需绑定hosts.将测试环境IP绑定域名,输入域名即可连接到测试环境. 1 hosts文件地址:C:\WINDOWS\system32\drivers\etc 2 用记事本打开hosts ...
- [蟒蛇菜谱] Python方便使用的级联进度信息
class StepedProgress: '''方便显示进度的级联进度信息. ''' def __init__(self, stockPercent=[1], parentProgress=None ...
- gcc学习笔记
1:第一个程序 : hello world #include <stdio.h> int main(void) { printf("Hello , world ! \n" ...
- Win10/UWP新特性系列-GetPublisherCacheFolder
微软Windows Runtime App拥有很强的安全模型来防止不同App之间的数据获取和共享,也就是我们所说的"沙盒机制",每个App都运行在Windows沙盒中,App之间的 ...
- Gvim+Emmet.vim 那些事。
转自:http://www.jianshu.com/p/67fa1e2114c5 背景 HTML和CSS的写法相对固定,而且重复的工作特别多,特别是尖括号实在是很烦.使用Emmet至少能帮你节省一半的 ...