题目原文: Nuts and bolts. A disorganized carpenter has a mixed pile of n nuts and n bolts. The goal is to find the corresponding pairs of nuts and bolts.  ...
                            
                            
                                分类:
编程语言   时间:
2017-07-25 21:09:34   
                                阅读次数:
224
                             
                         
                    
                        
                            
                            
                                    题目原文: Stack with max. Create a data structure that efficiently supports the stack operations (push and pop) and also a return-the-maximum operation. A ...
                            
                            
                                分类:
其他好文   时间:
2017-07-24 19:16:47   
                                阅读次数:
181
                             
                         
                    
                        
                            
                            
                                    题目原文: Suppose that the subarray a[0] to a[n-1] is sorted and the subarray a[n] to a[2*n-1] is sorted. How can you merge the two subarrays so that a[0] ...
                            
                            
                                分类:
编程语言   时间:
2017-07-22 00:44:32   
                                阅读次数:
284
                             
                         
                    
                        
                            
                            
                                    题目原文: Implement a queue with two stacks so that each queue operations takes a constant amortized number of stack operations. 题目要求用栈实现队列的所有操作。 ...
                            
                            
                                分类:
其他好文   时间:
2017-07-22 00:43:51   
                                阅读次数:
205
                             
                         
                    
                        
                            
                            
                                    题目原文: 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 ...
                            
                            
                                分类:
编程语言   时间:
2017-07-22 00:12:01   
                                阅读次数:
236
                             
                         
                    
                        
                            
                            
                                题目原文: 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 ...
                            
                            
                                分类:
编程语言   时间:
2017-07-22 00:06:56   
                                阅读次数:
226
                             
                         
                    
                        
                            
                            
                                理论 机器学习技法:https://www.coursera.org/course/ntumltwo 假设上述网址不可用的话,自行度娘找别人做好的种子。或者看这篇讲义也能够:http://www.cnblogs.com/xbf9xbf/p/4712785.html Theano代码 须要使用我上一篇 ...
                            
                            
                                分类:
其他好文   时间:
2017-07-21 10:41:54   
                                阅读次数:
255
                             
                         
                    
                        
                            
                            
                                题目要求: An array is bitonic if it is comprised of an increasing sequence of integers followed immediately by a decreasing sequence of integers. Write a  ...
                            
                            
                                分类:
其他好文   时间:
2017-07-20 00:53:00   
                                阅读次数:
271
                             
                         
                    
                        
                            
                            
                                题目要求: Design an algorithm for the 3-SUM problem that takes time proportional to n2 in the worst case. You may assume that you can sort the n integers  ...
                            
                            
                                分类:
其他好文   时间:
2017-07-20 00:44:54   
                                阅读次数:
285
                             
                         
                    
                        
                            
                            
                                这次作业与第一周作业相比,稍微简单一些。有三个编程练习:双端队列(Deque)设计、随机队列(Randomized Queue)设计,还有一个排列组合类Permutation。 一、双端队列Deque 设计要求:A double-ended queue or deque (pronounced "d ...
                            
                            
                                分类:
其他好文   时间:
2017-07-19 14:12:44   
                                阅读次数:
140