摘要:
题目原文: Implement a queue with two stacks so that each queue operations takes a constant amortized number of stack operations. 题目要求用栈实现队列的所有操作。 阅读全文
摘要:
题目原文: Given two integer arrays of size n , design a subquadratic algorithm to determine whether one is a permutation of the other. That is, do they co 阅读全文
摘要:
题目原文: Given two arrays a[] and b[], each containing n distinct 2D points in the plane, design a subquadratic algorithm to count the number of points t 阅读全文
摘要:
第二周课程的Elementray Sorts部分练习测验Interview Questions的第3题荷兰国旗问题很有意思。题目的原文描述如下: Dutch national flag. Given an array of n buckets, each containing a red, whit 阅读全文