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 ...
随机推荐
- 习题-第1章了解ASP.NET MVC
一.选择题 1.ASP.NET MVC自2007年首次公布预览以来,作为( )的替代品,普及度已明显提高,现在很多大型Web应用程序都是使用这一技术构建的. A.ASP B.ASP.NET ...
- office openxml学习(一)
以前用过,aspose.dll处理word ,excel,之后发现 npoi,使用了一段时间,总觉得是第三方,不明白底层的实现,直到最近发现了office openxml ,其实这个技术,很久以前就有 ...
- c# string.format json字符串 formatException错误
正常字符串的string.format是没问题的但是在拼接json的字符串的时候因为里面包含了 {} 花括号 里面又嵌套了 {0} {1} {2}这些要替换的关键字 所以会报错. 经过百度. 字符串 ...
- Octopus系列之各个页面调用示例2
判断登陆的调用 #if(${islogin}) <span> ${Oct_Welcome} or <a href="${siteurl}customer/logout/&q ...
- c#网络通信框架networkcomms内核解析 序言
NetworkComms网络通信框架序言 networkcomms是我遇到的写的最优美的代码,很喜欢,推荐给大家:) 基于networkcomms2.3.1开源版本( gplv3)协议,写了一些文章, ...
- C#微信公众号开发之网页授权oauth2.0获取用户基本信息(一)
咨询 请加 QQ::QQ群: 在微信里面,非认证的公众号账号,只能通过在微信回复菜单单击等事件获取openid,但是认证的公众账号(之前认证的订阅号是不可以的,现在新开放了政府媒体机构的认证订阅号)可 ...
- golang——concurrency笔记
1.主线程结束后将安全退出子线程
- OWL,以及XML,RDF
Ontology来源于哲学词汇:存在论(也有翻译成本体论).RDF是一种不错的本体描述方式,我们可以定义根据对现实世界的理解针对某个领域定义词汇来描述这个领域的知识.但RDF与RDF不能定义同义词.反 ...
- priority_queue 优先队列用法
//采用默认优先关系: //(priority_queue<int>que;) //Queue 0: // 91 83 72 56 47 36 22 14 10 7 3 // //采用结构 ...
- Python 入门指南
Release: 3.4 Date: March 29, 2014 Python 是一门简单易学且功能强大的编程语言. 它拥有高效的高级数据结构,并且能够用简单而又高效的方式进行面向对象编程. Pyt ...