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 ...
随机推荐
- 002_kafka_相关术语详细解析
参考: http://www.cnblogs.com/likehua/p/3999538.html http://kafka.apache.org/documentation.html#getting ...
- 如何在MapControl界面添加双击事件实现标绘及符号样式更改
private void axMapControl1_OnDoubleClick(object sender, ESRI.ArcGIS.Controls.IMapControlEvents2_OnDo ...
- ssm(spring,springmvc,mybatis)
1.配置web.xml <?xml version="1.0" encoding="UTF-8"?> <web-app version=&qu ...
- MVC 与 webform比较
来自:http://www.cnblogs.com/xiaozhi_5638/p/4019065.html ASP.NET Webforms Behind Code的好处和存在的问题 ASP.NET ...
- CTSC2015 酱油记
终于又到写酱油记的时间了...不过开心不起来诶.. Day 0 晚上睡不着觉也不造为啥... 起来看了一本亚里亚小说,继续睡,睡不着... 又起来看了一本亚里亚小说,继续睡,睡不着... 然后...死 ...
- javascript的坑
1 for in循环:使用它时,要主要遍历的是所有可枚举的属性(实例以及原型中的属性) function Person(name){ this.name = name; } Person.protot ...
- CENTOS/UBUNTU一键安装IPSEC/IKEV2 VPN服务器
1.在azure上创建ubuntu虚拟机 选择v15.04 server 版本 2.添加端口号 3.远程桌面到ubuntu 命令行 输入 sudo su 输入创建 ubuntu虚拟机 时候的 密码 ...
- 如何编译spring源码,并导入到eclipse中
wsc@WSC-PC /d/wsc/study-spring-source$ git clone https://github.com/spring-projects/spring-framework ...
- My first Scratch small game
My first Scratch small game:https://scratch.mit.edu/projects/62700370/ PC or Mac only. Browser & ...
- iOS-Gdata XML解析配置和简单使用
简单介绍使用废话少说直接上图就能看明白... 导入libxml2,使用第三方AFNetworking网络请求,第三方XML解析GData GData需要的配置 Build Settings 里搜索,添 ...