Explain the difference between templates in C++ and generics in Java.
What is the differences between final, finally, and finalize?
In Java, does the finally block gets executed if we insert a return statement inside the try block of a try-catch-finally?
In terms of inheritance, what is the effect of keeping a constructor private?
Write a smart pointer (smart_ptr) class.
Why does a destructor in base class need to be declared virtual?
Write a method that takes a pointer to a Node structure as a parameter and returns a complete copy of the passed-in data structure. The Node structure contains ...
What is name hiding in C++?
You have an array with all the numbers from 1 to N, where N is at most 32,000. The array may have duplicate entries and you do not know what N is. With only 4KB ...
What is the significance of the keyword "volatile" in C?
Given an input file with four billion integers, provide an algorithm to generate an integer which is not contained in the file. Assume you have 1 GB of memory. ...
What is the difference between deep copy and shallow copy? Explain how you would use each.
How do virtual functions work in C++?
Compare and contrast a hash table vs. an STL map. How is a hash table implemented? If the number of inputs is small, what data structure options can be used ins ...
Write a method to print the last K lines of an input file using C++.
You have to design a database that can store terabytes of data. It should support efficient range queries. How would you do it?
You have a billion urls, where each is a huge page.. How do you detect the duplicate documents?
If you were designing a web crawler, how would you avoid getting into infinite loops?看最近的章节没同学做,有几天没发。都是分析题,今天多发点。
How would you design the data structures for a very large social network(Facebook, LinkedIn, etc)? Describe how you would design an algorithm to show the connec ...
If you were integrating a feed of end of day stock price information(open, high, low, and closing price) for 5,000 companies, how would you do it? You are respo ...