[LeetCode] Intersection of Two Linked Lists
Intersection of Two Linked ListsWrite a program to find the node at which the intersection of two singly linked lists begins.For example, the following two linked lists:A: &nbs...
[LeetCode] Find Peak Element
Find Peak ElementA peak element is an element that is greater than its neighbors.Given an input array where num[i] ≠ num[i+1], find a peak element and return its index.The array may contain multi...
[LeetCode] Excel Sheet Column Title
Excel Sheet Column TitleGiven a positive integer, return its corresponding column title as appear in an Excel sheet.For example: 1 -> A 2&n...
[LeetCode] Majority Element
Majority ElementGiven an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times.You may assume that the array is non-empty ...
[LeetCode] Factorial Trailing Zeroes
Factorial Trailing ZeroesGiven an integer n, return the number of trailing zeroes in n!.Note: Your solution should be in logarithmic time complexity.解题思路:n!=2^x*3^y*5^z...,注意到一个2和一个5贡献一...
[LeetCode] Excel Sheet Column Number
Excel Sheet Column NumberRelated to question Excel Sheet Column TitleGiven a column title as appear in an Excel sheet, return its corresponding column number.For example: A...
[LeetCode] Repeated DNA Sequences
Repeated DNA SequencesAll DNA is composed of a series of nucleotides abbreviated as A, C, G, and T, for example: "ACGAATTCCG". When studying DNA, it is sometimes useful to identify repeated ...
[LeetCode] Largest Number
Largest NumberGiven a list of non negative integers, arrange them such that they form the largest number.For example, given [3, 30, 34, 5, 9], the largest formed number is 9534330.Note: The ...
[LeetCode] Binary Search Tree Iterator
Binary Search Tree IteratorImplement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST.Calling next() will return the next smallest n...
[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...