[LeetCode] Min Stack
Min Stack Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.push(x) -- Push element x onto stack.pop() -- Removes the element on top of the stack.to...
[LeetCode] Number of Islands
Number of IslandsGiven a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacent lands...
[LeetCode] Rotate Array
Rotate ArrayRotate an array of n elements to the right by k steps.For example, with n = 7 and k = 3, the array [1,2,3,4,5,6,7] is rotated to [5,6...
[LeetCode] House Robber
House RobberYou are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from robbing each of them is that ad...
[LeetCode] Reverse Bits
Reverse BitsReverse bits of a given 32 bits unsigned integer.For example, given input 43261596 (represented in binary as 00000010100101000001111010011100), return 964176192 (represented in binary...
[LeetCode] Number of 1 Bits
Number of 1 BitsWrite a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as the Hamming weight).For example, the 32-bit integer ’11' has binar...
查看磁盘文件夹大小工具WinDirStat
WinDirStat是一个巨牛的工具,能够查看每个文件夹占用空间大小。便于清理文件。官方链接为:https://windirstat.info/ 同时也有Linux版(http://kdirstat.sourceforge.net/)的和Mac版的(http://www.derlien.com/、http://grandperspectiv.sourceforge.net/)
SqlServer数据库比对工具 Open DBDiff
两个数据库merge的时候,若有一个可视化的工具该多好呀。早有人想到这点,于是有了Open DBDiff。链接地址:https://opendbiff.codeplex.com/这个工具能够比对表格模式、表格数据。但是有几个不足之处:(1)若表数据太多,加载的时候可能会出现错误。并且不能按特定条件加载数据(2)数据匹配时,merge的规则是比较索引是否相同,不能自定义merge规则。(3)比对数据...
[LeetCode] Search Insert Position
Search Insert PositionGiven a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.You may assume no duplic...
2015年04月02日阿里笔试总结
每次写简历的时候感觉自己很牛逼,每次面试和笔试的时候,却发现自己很搓逼,今天阿里笔试再次被鄙视!感觉要学的东西太多了啊。1. 函数lg(ax^2-8x+a-6)的值域为R,那么实数a的取值范围为A. [0, 8] B.[-2, 8]C. (0, 8]D.(-2, 8]E.(-2, +无穷)F.[8, +无穷)尼玛,这不是高中的题目吗?全忘了有不有?静下心来分析一下,函数的值域为R,那么ax^2-8...
[LeetCode] Binary Tree Right Side View
Binary Tree Right Side ViewGiven a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom.For example:Given the...
[LeetCode] Palindrome Partitioning II
Palindrome Partitioning II Given a string s, partition s such that every substring of the partition is a palindrome.Return the minimum cuts needed for a palindrome partitioni...
[LeetCode] Length of Last Word
Length of Last WordGiven a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string.If the last word does not...
[LeetCode] Binary Tree Postorder Traversal
Binary Tree Postorder TraversalGiven a binary tree, return the postorder traversal of its nodes' values.For example:Given binary tree {1,#,2,3}, 1 &nbs...
[LeetCode] Spiral Matrix II
Spiral Matrix IIGiven an integer n, generate a square matrix filled with elements from 1 to n2 in spiral order.For example,Given n = 3,You should return the following mat...
穿越时空的思念
犬夜叉的主题区,很好听。
[LeetCode] Construct Binary Tree from Inorder and Postorder Traversal
Construct Binary Tree from Inorder and Postorder TraversalGiven inorder and postorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in the tree.解题思路:可...
[LeetCode] Letter Combinations of a Phone Number
Letter Combinations of a Phone NumberGiven a digit string, return all possible letter combinations that the number could represent.A mapping of digit to letters (just like on the telephone buttons) is...
[LeetCode] Plus One
Plus OneGiven a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the most significant digit is at the head of the list.解题思路:这道题倒是挺简单的,但是我最开...
[LeetCode] Merge Two Sorted Lists
Merge Two Sorted ListsMerge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.解题思路:这道题是我做的leetcode最容易的题目了。其中有个小技巧,就...