Software17.10.2016

10 tough programming questions you will face in a Google interview

Google logo on blackboard

Software engineer Pierre Gauthier was recently interviewed for the position of Director of Engineering at Google, and decided to post the questions he faced during the interview.

“Google’s representative stated that both management and up-to-date coding skills were required – a rare mix,” he said.

“But having exercised the former for more than two decades and the latter for almost four decades was not enough: I failed to give the right answers.”

He questioned whether Google raised the bar too high, or whether its “recruiting staff seriously lacked the skills they are supposed to rate”.

Here are the “highly technical” questions and their answers which Gauthier shared in his blog post.

What is the opposite function of malloc() in C?

Answer: free()

What Unix function lets a socket receive connections?

Answer: listen()

How many bytes are necessary to store a MAC address?

Answer: six

Sort the time taken by: CPU register read, disk seek, context switch, system memory read.

Answer: CPU register read, system memory read, context switch, disk seek.

What is a Linux inode?

Answer: It’s file metadata.

What Linux function takes a path and returns an inode?

Answer: stat()

What is the name of the KILL signal?

Answer: “TERMINATE”

Why Quicksort is the best sorting method?

Answer: Quicksort has the best big-O

There’s an array of 10,000 16-bit values, how do you count the bits most efficiently?

Answer: Use a lookup table and then sum the results

What is the type of the packets exchanged to establish a TCP connection?

Answer: It’s SYN, SYN-ACK, and ACK; if Google is down you will need to know this to diagnose what the problem is.

Now read: 10 brain-straining Google interview questions

Show comments

Latest news

More news

Trending news

Poll

What PC screen brand do you prefer?

View Results

Loading ... Loading ...
Sign up to the MyBroadband newsletter