140 Google interview questions impact interview electricity lesson plans middle school


• Every man in a village of 100 married couples has cheated on his wife. Every wife in the village instantly knows when a man other than her husband has cheated, but does not know when her own husband has. The village has a law that does not allow for adultery. Any wife who can prove that her husband is unfaithful must kill him that very day. The women of the village would never disobey this law. One day, the queen of the village visits and announces that at least one husband has been unfaithful. gas constant What happens?

• Four people need to cross a rickety rope bridge to get back to their camp at night. Unfortunately, they only have one flashlight and it only has enough light left for seventeen minutes. The bridge is too dangerous to cross without a flashlight, and it’s only strong enough to support two people at any given time. Each of the campers walks at a different speed. One can cross the bridge in 1 minute, another in 2 minutes, the third in 5 minutes, and the slow poke takes 10 minutes to cross. How do the campers make it across in 17 minutes?

• You have five pirates, ranked from 5 to 1 in descending order. The top pirate has the right to propose how 100 gold coins should be divided among them. But the others get to vote on his plan, and if fewer than half agree with him, he gets killed. v gashi 2015 How should he allocate the gold in order to maximize his share but live to enjoy it? (Hint: One pirate ends up with 98 percent of the gold.)

• You are given 2 eggs. You have access to a 100-story building. Eggs can be very hard or very fragile means it may break if dropped from the first floor or may not even break if dropped from 100th floor. Both eggs are identical. gas bloating pain You need to figure out the highest floor of a 100-story building an egg can be dropped without breaking. The question is how many drops you need to make. You are allowed to break 2 eggs in the process.

• 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?

• You are given a list of numbers. When you reach the end of the list you will come back to the beginning of the list (a circular list). Write the most efficient algorithm to find the minimum # in this list. Find any given # in the list. The numbers in the list are always increasing but you don’t know where the circular list begins, ie: 38, 40, 55, 89, 6, 13, 20, 23, 36.

• Design and describe a system/application that will most efficiently produce a report of the top 1 million Google search requests. These are the particulars: 1) You are given 12 servers to work with. They are all dual-processor machines with 4Gb of RAM, 4x400GB hard drives and networked together.(Basically, nothing more than high-end PC’s) 2) The log data has already been cleaned for you. electricity outage in fort worth It consists of 100 Billion log lines, broken down into 12 320 GB files of 40-byte search terms per line. 3) You can use only custom written applications or available free open-source software.

• There is an array A[N] of N numbers. You have to compose an array Output[N] such that Output[i] will be equal to multiplication of all the elements of A[N] except A[i]. For example Output[0] will be multiplication of A[1] to A[N-1] and Output[1] will be multiplication of A[0] and from A[2] to A[N-1]. Solve it without division operator and in O(n).

• You are given a game of Tic Tac Toe. a shell gas station near me You have to write a function in which you pass the whole game and name of a player. The function will return whether the player has won the game or not. First you to decide which data structure you will use for the game. You need to tell the algorithm first and then need to write the code. Note: Some position may be blank in the game। So your data structure should consider this condition also.

• You need to check that your friend, Bob, has your correct phone number, but you cannot ask him directly. types of electricity generation methods 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?

They don’t have some of the happiest employees. Average software engineer is only there for a few years before they move on. In fact, if you’ve been there for a while and NOT been headhunted, it sort of looks weird. In any case, it’s long hours, and working on weekends is not at all uncommon (I once worked 11 weeks straight without a day off, and many of those were 14-16 hour days). They give you breakfast, lunch and dinner for a reason, you know.

By the way, I interviewed a few hundred people for SWE positions while I was at Google. Many of your example questions not only aren’t asked, they’re explicitly forbidden. You are not allowed to ask frivolous brainteaser crap about manhole covers (there are actually two shapes which won’t fall back into the hole, in case you were curious) or why 0xDEADBEEF is 3735928559 in decimal. You don’t ask that nonsense because the questions are crap and tell you absolutely nothing about the candidate.

You’re supposed to ask open-ended questions that test problem solving and general knowledge, then get into specifics. Once answered, you pick a topic in the answer and you dive in deeper. gas 85 The goal to to find out where the candidates run out of ideas. Typically you want to test general knowledge, and find an area that you two can really dig deep into. At that point, you send the candidate to the whiteboard and have them start writing code.

Similarly, you don’t ask "How would you store a million phone numbers?", you ask "How would you sort a million phone numbers on a machine that only had 256KB of memory?" You want to see if they can figure out how to solve the problem creatively given your constraints. And when they write it out, you ask "OK, so that solution is O(n log n)… how can you make it more efficient?" And if they don’t know about Big O notation, well then you immediately know you’re not hiring that person.

My favorite question was to ask them to write a little program that solved a rubik’s cube. It’s got a bunch of possible answers and some that I saw were actually quite creative. (The best way, again in case you’re curious, is to "open the cube up" and treat it as an asymmetrical grid. You go through it row and column and match up the six colors.)

Some real advice: When given open-ended questions, immediately ask questions in return that would help define the constraints. They want you to sort something, ask if it’s a list of INTs, that sort of thing. gas after eating salad But the best advice I can give anyone interviewing there is to sharpen your ability to understand engineers for whom English is a second language. Chances are very good that you’ll be interviewing with someone who is difficult to understand. Sad, but true.

I have been on zero job interviews since I graduated college 12 years ago – I have worked at that same company all this time. So I have no earthly idea what other companies do, but when I interview engineers, I want really don’t care about seeing them answer some “gotcha” mind games nor even seeing that they can implement some obscure algorithm from memory.

Chances are, if you have written a b-tree or any such rudimentary algorithm in your professional life, you’re doing something wrong. For the overwhelming majority of software engineers, you’re using a language that has these structures built in. You need to be able to use the object model or library or whatever it is that you have in your environment, but getting someone to regurgitate how to build tree structure XYZ from college is not a meaningful exercise. In the off chance that you need to write a b-tree in your professional life because for whatever reason the one built in to your language doesn’t meet your needs, you aren’t going to be doing it from scratch – you can have a textbook or Wikipedia article or whatever sitting right next to you. You still don’t need to do it from scratch.

I also hate making someone write something up on a white board while I watch unless it’s something very brief and it’s easier for them to write it rather than say it. It’s a waste of my valuable time to sit there while you write a program on a whiteboard – I’d rather either (a) give you a computer to do it or (b) just sit you in a conference room with a written test and say come get me when you’re done and ready to talk.