b***y 发帖数: 2799 | 1 For a position in Human resource department. They are developing a system to
track job interviewees for Bloomberg. A year ago ...
1. If you insert a key into a STL set and the key is already in the set,
what will happen?
2. Merge two unsorted array. Each array has unique values, but there are
dupliates between two arrays. Remove the duplicates and merge them. Time
complexity must be better than O(nlogn). You shouldn't use hash table.
3. Write a program to calculate average of an array of integers. How to
handle overflow with C++? (use exception handling)
4. One single-threaded program on PC, one single-threaded program on server
that has "read input", "process", "send output" steps. The user enters a
request on the PC, the request is sent to the server, and the server
processes it for two minutes and gets back to users. When the server is
processing the request, the user's screen freezes. The minmum time interval
between two requests from the user is four minutes. Now we will have five
more users, what can you do to make the system reponds better? Each user can
have seperate PCs.
5. What kind of errors you may have when running a program? Such as abort,
segment fault, bus error. Why? What may cause your program to exit
unexpectedly. List as many as you can.
6. How do you design a hash table. Details about the hash function. Why use
prime number?
7. To be able to use vector vec(6), What need to be defined for
AObject class? (like default constructor...)
8. What's the toughest question you will ask a interviewee? Then, answer it
by yourself.
9. How the OS implements malloc? What's heap? why is it called heap? (
Actually it's implemented with a heap data structure.)
10. Design a Human resources job application/interview database system. Draw
ER diagram, design tables.
11. You have an endless stream of characters. You are given a dictionary.
You need to count how many times the words in the dictionary appear in the
stream. For example, for a stream "....today....", the counts for words "to"
, "day", "today" should all be increased by one. (I used a prefix tree to
save the dictionary) The interviewer emphasized it was a stream. I don't
know what he expected.
12. Design a class for a phone.
13. Rate yourself on C++, 1 to 10. |
|