15 Brain-Bending Interview Questions That Every Facebook Engineer Can Answer

mark zuckerberg facebook

Photo: AP

Google is known for asking some tough, crazy questions when interviewing its engineers.But Facebook has some pretty intense questions, too.

We’ve found a bunch of interesting ones on Glassdoor.com, a place where you can rate your interviewing experience, and assembled a list.

We’ve gone through the list to try and create a plain English translation for each problem, too.

Write a function that can show the number of users online at any given time.

Position: Software engineer

You're given a period of time where users log in and log out and a set of login and log out times for those users. Facebook is asking you to create an efficient algorithm that will calculate a simple, but extremely important, metric.

How can you benefit from fraudulent Facebook credits?

Position: 'Risk' at Facebook

Facebook asks a lot of hypotheticals, compared to companies like Google which stick to complex topics. This is just one example.

Given a dictionary based simple password, create all possible (special character) passwords based on a provided mapping.

Position: Software Engineer

Most people will want to 'flair' up their passwords -- like swapping in special characters. Facebook will give you a map of those -- say, turning an 'a' into an '@,' and you need to determine every password configuration given a word as a password.

Good to know, so Facebook can weed out bad passwords and keep the site secure.

Determine the 10 most frequent words given a terabyte of strings.

Position: Software engineer intern

Facebook has a ton of data, and it needs to be able to parse through it and find out what's trending. That's one way it knows how to target advertisements on your News Feed and deliver relevant information.

And a terabyte is a TON of data. What are you waiting for? Get cracking!

Use basic operations to create a square root function

Position: Software engineer intern

The square root operation is a critical and complex mathematical operation -- but like every other piece of maths, it's based off basic operations.

Find the centre of graph (vertex, that is connected with every other vertex, but edges are directed to the centre of graph).

Position: Software engineer intern

What engineering interview wouldn't be complete without a complex maths problem?

Facebook still needs to check that you know how to think logically and use basic ideas like graph theory to determine the structure of a set of connected objects.

Granted, this is really useful for Facebook too -- since you can determine how relationships are structured amongst friends.

Various questions about the look-and-say sequence.

Position: Software engineer

The look-and-say sequence is a sequence of numbers that's literally generated off what is said aloud based off the previous number.

For example, you start with 1, when said aloud is 'one 1.' Thus, the second number in the sequence is 11, which said aloud is 'two ones.' The third number is 21.

You'll be asked to create a sequence like that and manipulate it. Talk about mind-bending.

What can Facebook do in order to improve and expand its user-base, particularly with the elderly?

Position: Platform operations analyst

Facebook hires a lot of 'analysts' that are supposed to help them acquire new users. So Facebook will ask you about long-tail users -- like elderly people -- and the best ways to acquire them.

Multiply two big integers which don't fit into an built-in integer type. How would you represent big numbers as a data structure?

Position: Software engineer

You have to write the function to multiply two big integers.

As in, really big -- so big that you'll have to treat them as a different kind of data point than an integer and produce a number that's the result of multiplying those two numbers.

Given an array of numbers, how would you search for one number?

Position: Software engineer

Search is a critical part of Facebook. There's a ton of information on the site, and its users will want to ferret out relevant information as quickly as possible.

That basically boils down to a problem of having a long string and trying to pick out a little bit of relevant information.

Output, in order, the most common words present in the file.

Position: Operations engineer

You'll be given a text file and Facebook wants to know what the most common words are in that file.

Facebook needs to know what's trending on the site, so this is a simple problem that can be extrapolated into finding the most common words in a news feed and divining what's trending from that information.

What would you do if a team member was not completing his or her share of the work?

Position: User operations analyst

Facebook is still a startup and needs everyone to work their butts off to make sure it delivers a killer product. That means being ready to weed out employees that are slacking off and not doing their fair share of work.

It's a tough question, but important to the success of any company. And Facebook likes to ask tough questions.

What is the difference between Facebook ads and Google Ads?

Position: Business analyst

Both track what you are doing and try to deliver an advertisement that's relevant and one that you are likely to click on.

But they are two very, very different platforms. How do they differ in terms of business?

You better have a good answer, because they are huge competitors.

Tell me your ideal team.

Position: User operations analyst

Part of having a successful career is building a killer team that meshes well, whose sum is greater than the whole of its parts.

That seems to happen a lot at Facebook, given that the site has more than 800 million users, but it's not done building yet.

What do you see as Facebook's biggest challenge in the next 5 years?

Position: Software engineer

It's not an unusual question, but it is unusual in that it was asked to a software engineer -- and most of the other questions on the site to software engineers are technical.

Facebook is looking for input from all its employees about the future of Facebook. That includes engineers, given that Zuckerberg himself started as an engineer.

Business Insider Emails & Alerts

Site highlights each day to your inbox.

Follow Business Insider Australia on Facebook, Twitter, LinkedIn, and Instagram.