My answers to over 100 Google interview questions
##Google Interview Questions: Software Engineer
- Why are manhole covers round?
-- Man hole covers are round because it is the only shape that cannot fit within itself.
-- Circles are the shape which requires the least amount of material to fit a full size man/woman
-- Circular tubes are the strongest to hold off the forces of the earth, hence cause the man hole to be circular
- What is the difference between a mutex and a semaphore? Which one would you use to protect access to an increment operation?
- A man pushed his car to a hotel and lost his fortune. What happened?
-- He didn't own the hotel on the monopoly board.
- Explain the significance of "dead beef".
- Write a C program which measures the the speed of a context switch on a UNIX/Linux system.
- Given a function which produces a random integer in the range 1 to 5, write a function which produces a random integer in the range 1 to 7.
- Describe the algorithm for a depth-first graph traversal.
- Design a class library for writing card games.
- You need to check that your friend, Bob, has your correct phone number, but you cannot ask him directly. You must write a the question on a card which and give it to Eve who will take the card to Bob and return the answer to you. What must you write on the card, besides the question, to ensure Bob can encode the message so that Eve cannot read your phone number?
- How are cookies passed in the HTTP protocol?
- Design the SQL database tables for a car rental database.
- Write a regular expression which matches a email address.
- Write a function f(a, b) which takes two character string arguments and returns a string containing only the characters found in both strings in the order of a. Write a version which is order N-squared and one which is order N.
- You are given a the source to a application which is crashing when run. After running it 10 times in a debugger, you find it never crashes in the same place. The application is single threaded, and uses only the C standard library. What programming errors could be causing this crash? How would you test each one?
- Explain how congestion control works in the TCP protocol.
- In Java, what is the difference between final, finally, and finalize?
- What is multithreaded programming? What is a deadlock?
Read full article from My answers to over 100 Google interview questions
No comments:
Post a Comment