Google
 

Thursday, August 30, 2007

Interview Questions(微软)

ref: http://hi.baidu.com/wertywang/blog/item/ef6acb10e09ef200203f2e49.html

C/C++:
    What is a virtual destructor? When is it needed?
    Difference between delete and delete []. What can happen if delete [] is not called for a new [].
    How can you pinpoint memory leak in an application?
    What is the meaning of "explicit" in front of a constructor declaration?
    What does it mean to have a "const" after the function argument closing parameter?
    What class methods does C++ automatically define for you?
    Describe situations where copy constructor is implicitly invoked.    
    Describe situation where you would like to override the "new" operator
    How do you find out size of stack your application used?
  What does the keyword volatile mean in C
Java:
     Describe the difference between final, finally and finalize in java.
Backgroup:
     Explain Virtual Memory. What is the TLB?
     Design patterns...
Communication:
     Explain a database in three sentences to your eight-year-old nephew
   Talk about your favourite project?
Analysis:
     How many buses/houses are there in Beijing?
  You have an array of ints. How would you find the two elements that sum to a particular value
  Given 2 files, each with names of thousands of customers who bought something on that particular day. Find the common customers.
Design/Coding:
(1) Design a system to get top 1 million search queries efficiently from search engine query log. Assume that, you are given 10 servers to work with, each with 4G RAM and 4x200G disk and network. The log files consists of 100 billion log lines.
(2) Implement unbounded precision multiplication.
(3) Reverse words in string.
(4) Reverse bits in byte.
       Advanced: reverse bits in n-bytes buffer.
(5) Write qsort and explain tradeoffs
(6) Given an array (1,1,2,2,3,3,4,4,5,5,6), return pointer to an array with no dups (1,2,3,4,5,6)
(7) Implement string split in C/C++
(8) Given a string, with spaces, replace spaces with %20.    You have extra space on the end of the string.
(9) Find largest sum in an array and return the sub-array.
(10) Count leaves nodes in binary tree
(11) Design Garbage Collector for C++.

No comments: