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 ...
随机推荐
- vue学习笔记之属性和方法
每个Vue都会代理其data对象里所有的属性:只有这些被代理的属性是响应的.如果在实例创建之后添加新的属性到实例上,它不会触发视图更新.例子: <script type="text/j ...
- 补psp进度(11月4号-9号)
这周psp进度 11月4号 内容 开始时间 结束时间 打断时间 净时间 小伙伴聊天实现 9:45 10:49 0 64m 学习HttpURLConnection 14:13 15:48 10m 85m ...
- 加强型无穷集合:InfiniteList<T>,可指定遍历方向和偏移量,只要集合有元素并且偏移量不为 0,将永远遍历下去。
主类: public class InfiniteList<T> : IEnumerable<T> { public List<T> SourceList { ge ...
- 鼠标滚轮控制侧边div上下翻动效果
css部分: <style> * { margin: 0; padding: 0;} .wrap { width: 1000px; margin: 0 auto; overflow: hi ...
- guava学习--集合2&Range
转载:http://www.cnblogs.com/peida/p/Guava_ImmutableCollections.html Table: 当我们需要多个索引的数据结构的时候,通常情况下,我们只 ...
- git基本使用方法
在本地mac,通过终端命令进入要上传的项目文件夹,也就是.xcodeproj文件所在的目录: 1)echo "# SubmitLocalProject" >> READ ...
- ConvertFrom-String 命令研究
-------先上个例子------- $aaa = @'0.027 0.034 0.834 0.1050.346 0.558 0.018 0.0780.001 0.997 0.001 0.0010. ...
- AngularJs的UI组件ui-Bootstrap分享(二)——Collapse
Collapse折叠控件使用uib-collapse指令 <!DOCTYPE html> <html ng-app="ui.bootstrap.demo" xml ...
- <s:textfield>标签
中的value=“”还是挺有用的,比如说更新之前,根据需要更新的用户(地址.商品等等等等)的id,在updateInput方法中,先做一些准备,根据这个id去数据库取属性出来,放到ActionCont ...
- Java 基本语法(1)
关键字 关键字的定义和特点 定义:被Java语言赋予了特殊含义,用做专门用途的字符串(单词) 特点:关键字中所有字母都为小写 Java保留字:现有Java版本尚未使用,但以后版本可能会作为关键字使用. ...