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 ...
随机推荐
- 转---- javascript prototype介绍的文章
JavaScript是基于对象的,任何元素都可以看成对象.然而,类型和对象是不同的.本文中,我们除了讨论类型和对象的一些特点之外,更重要的是研究如何写出好的并且利于重用的类型.毕竟,JavaScrip ...
- WCF初探-14:WCF服务协定
前言: 在前面的文章中,我们定义的服务协定上都会有一个ServiceContract的特性来修饰,这是因为服务契约的实现要靠ServiceContractAttribute 属性定义,然后使用一个或多 ...
- SqlServer和MySQL游标学习
一 sqlserver游标使用 /*** 游标的使用 讲了这个多游标的优点,现在我们就亲自来揭开游标的神秘的面纱. 使用游标的顺序: 声名游标.打开游标.读取数据.关闭游标.删除游标. 1.3.1 ...
- 使用实时文件夹显示ContentProvider的数据
所谓实时文件夹(即LiveFolder),是指用于显示ContentProvider提供的数据的桌面组件. ContentProvider用于向外提供数据访问的接口,一个应用程序可通过ContentP ...
- POJ 3216 最小路径覆盖+floyd
Repairing Company Time Limit: 1000MS Memory Limit: 131072K Total Submissions: 6646 Accepted: 178 ...
- poj3660 floyd
//Accepted 176 KB 16 ms //一头牛,如果rank是能确定的,那么能打败他的牛的个数和被他打败的牛的个数的总和为n-1 #include <cstdio> #incl ...
- BOM和DOM(精简版)
一.BOM 1.browser object model的缩写,简称浏览器对象模型 2.提供与浏览器窗口进行交互的对象 3.核心对象:window.除此之外还有:history,localtion,n ...
- c#中各类日期的计算方法,收藏
DateTime startWeek = dt.AddDays(1 - Convert.ToInt32(dt.DayOfWeek.ToString("d"))); //本周周一D ...
- xpcall 安全调用
-- xpall (调用函数f, 错误函数fe[, 参数]) function fun(a,b) -- 这里的参数没什么实际作用,就是展示下用法 return a / bend -- xpc ...
- Linux线程-互斥锁pthread_mutex_t
在线程实际运行过程中,我们经常需要多个线程保持同步.这时可以用互斥锁来完成任务:互斥锁的使用过程中,主要有pthread_mutex_init,pthread_mutex_destory,pthrea ...