散列函数
一个好的散列函数应满足简单一致散列的假设:每个关键字都等可能的散列到m个槽位的任何一个之中,并与其它的关键字已被散列到哪个槽位无关。
一个好的散列函数应满足简单一致散列的假设:每个关键字都等可能的散列到m个槽位的任何一个之中,并与其它的关键字已被散列到哪个槽位无关。
从一个由N个不同数值构成的集合中选择其第i个顺序统计量。
不同于比较排序O(lgn)的时间复杂度,线性时间排序可以在O(n)的时间完成排序。
堆数据结构是一种数组对象,它可以被视为一颗完全二叉树,树中每个节点与数组中存放该节点值的元素对应。
The count-and-say sequence is the sequence of integers beginning as follows 1, 11, 21, 1211, 111221, ... , Given an integer n, generate the nth sequence.
Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining.
Question:Given an absolute path for a file (Unix-style), simplify it.
Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. The brackets must close in the correct order, `()` and `()[]{}` are all valid but `(]` and `([)]` are not.
Min Stack Question : Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.
Single Number Question : Given an array of integers, every element appears twice except for one. Find that single one.