What do you like and what don’t you like about the Facebook advertising product?

4.73490047

Write the actual code to reverse a linked list

4.62398243

Given two arrays, find if the integers in array 2 are a subset of the integers in array 1.

4.578107

What about Facebook interests you?

4.550096

what do you know about facebook new features

4.523213

What’s the complexity of Binary Search?

4.487533

What are the challenges of Facebook in international market?

4.44423771

How would you change facebook? How would you change the help center?

4.21991348

Tell me about a time you disagreed with your manager about an issue, and what did you do to overcome it?

4.21471

Why would you be a fit for the job?

4.13441849

Why online advertising?

4.133214

Given a binary tree, print out the elements in order. Without recursion.

4.10630941

How would you pitch Facebook to a client?

4.092223

Do you like the new Facebook homepage?

4.08230734

1) What do you think of the new FB layout?

3.95883632

If you were an animal what kind would you be and why?

3.89875364

Write a program on the whiteboard to reverse a linked list

3.883647

find the head of a linked list

3.85950613

What changes would you make ?

3.81755018

How can you improve facebook user experience?

3.80661845

What problems do you think Facebook faces with fraud?

3.7907486

What will you bring to the team?

3.77259064

Print out all the permutations of a string

3.7427547

Implement strstr

3.72233915

What do you think of XXX company ?

3.70839548

What is you favorite FB feature and how would you describe to someone how to use it?

3.67748952

Write a function to calculate square root of a number

3.6246593

Write a function that prints a binary tree level-by-level.

3.572625

Tell me about a time you had to work on a team etc.

3.57160783

How would you improve Facebook’s Advertising platform.

3.56348014

What is your favorite thing about Facebook Advertising

3.56340551

Tell me your ideal team.

3.55936217

How to traverse a binary tree in order recursively.

3.536983

What would you change about Facebook if you started tomorrow?

3.51743627

Write a function that prints out all subsets of a given set of numbers.

3.50357842

Given a set of characters, print out all possible permutations.

3.500071

What experience do you have with online fraud?

3.476896

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

3.46973467

How would you make the company proud of IT?

3.434016

What would your friends say about you if I were to ask them about you?

3.41643333

Do you think that Facebook should be available to China?

3.38869238

what are your feelings about working on a team?

3.36536312

Find the minimum depth of binary search tree

3.23937154

What is a good day at work for you?

3.232144

If you were given 50 new clients today, how would you start?

3.222124

With your finance background, why do you want to work in technology now?

3.21983886

Very general questions: So – tell me about yourself…..

3.21356153

What is your current salary?

3.20280552

Write a function that takes in two binary strings and returns their sum (also a binary string).

3.2017355

What can you contribute to the team?

3.16750979

What challenges do you think Facebook is facing right now?

3.128807

Given an unsorted array of integers, find a 3-element subset that sums to zero

3.12723851

How does FB work

3.09927726

Given a binary tree, write a function to find the length of the longest path in the tree.

3.06595778

Print a binary tree in infix order. Recursive and iterative.

3.04942465

What problems could FB face in international markets

3.045809

Why did you leave previous job?

3.03304434

What makes you excited about this job?

3.02264738

What can you do to combat fraud with Facebook credits and how would approach it?

3.01861262

Why do you think direct response advertising is effective?

2.9647007

What would you fix with X Product?

2.95714164

If you were handed 50 new target accounts how would you start?

2.942334

How to implement a DST?

2.91643238

How does Facebook make money?

2.89820385

How will you design TinyUrl?

2.8862288

What sets facebook apart from other similar networking sites?

2.8695538

Given a list of strings, for each string, find if it has an anagram in the list.

2.84635258

What are your strengths and weaknesses?

2.81869078

Introduce about yourself

2.81240582

In the phone interview:

Question: why do you like this position?

2.80736637

Binary search on a sorted, but rotated array.

2.77596569

Do you have private projects?

2.7502768

Implement square root function using basic operations ?

2.714552

How do you deal with conflict in a team

2.68523383

how did you impact your organization in your current assignments

2.642786

Generate a new array from an array of numbers. Start from the beginning. Put the number of some number first, and then that number.
For example, from array 1, 1, 2, 3, 3, 1
You should get 2, 1, 1, 2, 2, 3, 1, 1
Write a program to solve this problem.

2.62812638

given an array of strings, find all the lists of anagrams present.

2.624651

If given “this problem,” what steps would you take to solve it?

2.6201725

Insert a node in a singly linked circular list given any node in the list.

2.61506

Write a function that takes a binary tree as input, and have it perform In order traversal – recursive and then iterative

2.609032

Implement stack using a queue

2.58845019

Write code to solve the following problem

2.585657

Given a Binary Search Tree, iterate over the elements without using recursion.

2.58389974

search needle in haystack problem

2.56304073

Given a string, remove all chars from the string that are present in say another string called filter.

2.55526733

Who are Facebook’s competition?

2.55006313

What have you been working on recently?

2.54769254

What skills will you take away from your experience working for Facebook?

2.54217649

Write a function that takes in an input array of strings and output a list of sets of anagrams.

2.51394486

Tell me a time you were working with a group in which there was conflict

2.50202918

How could Facebook make more money?

2.500565

print out all prime numbers in a given string. abc2134kd31 -> 2, 13, 3, 3

Find an algorithm to find the largest sum subarray in an array of integers. (Better than O(n^2) ).

1.84995091

What is a recent project you are really proud of?

1.84549057

When are you available for a phone interview?

1.84436727

How to implement Sqrt(double k) efficiently?

1.84341812

what are the key insights that you have taken away in your last few years working?

1.83555949

I wasn’t asked any unexpected question.

1.81064141

The question about what kind of position I would interest, frontend or backend? Since I never work before, I don’t know what aspect is more suitable for me.

1.79717124

Given a positive real number x, find the square root of x without using built-in sqrt functions.

1.79595613

What would you say to someone interested in advertising on a small budget? why should they choose us?

1.78411376

A “what would you do in this situation” question. (I can’t give any more details since I signed their NDA)

1.78180885

3) Can you think of some ways to gain users in EMEA?

1.78177392

What is the running time of quicksoft?

1.7724427

What previous experience has led you to apply for this specific position?

1.76131535

given a list of words with a same size and a big string that contains one of the permutation of all the words combined(say p), find the startindex of the string p in the big string

1.75697255

basic string operations, trees, sorting

1.72638142

What should Facebook do to attract new users in the EMEA countries? Describe your best two ideas.

1.72082365

A file contains 10 billions of Strings and need to find duplicate Strings. You have N number of systems available. How will you find duplicates?

1.71425748

Write a list class where the only data structure available is a stack

1.7113986

Implement a queue data structure given only stacks. What is the time complexity of enqueuing and dequeuing operations?

1.70895338

What keywords would suggest a client use in targeting customers interested in camping gear? What keywords would you suggest if they were writing an ad for Google? How do these differ?

1.70628715

If you were analyzing thousands of transactions, what are some details that would stick out to you that a payment might be fraudulent?

1.70528471

Given a function for a fair coin, write a function for a biased coin that returns heads 1/n times (n is a param).

1.69975841

I was asked to explain a few projects on my resume

1.69927454

Multiply two big integers which don’t fit into an built-in integer type. How would you represent big numbers as a data structure? Write the function to multiply two big integers.

1.68208086

Find the first letter in a string that does not have a pair.

1.68160069

Some questions on graph theory and then I was asked to write a function to check if a graph was bipartite.

1.67164409

What is the difference between inline html and block html?

1.67006683

How can a perpetrator benefit from obtaining fraudulent Facebook credits?

1.66919518

Given an array of integers, now we want to erase all 0’s (can be other value), and we want the result array condensed, meaning no empty cell in the array.

1.66841948

Draw out Facebook’s infrastructure.

1.66670561

How can you possibly do technical management if you’re a very strong senior engineer?

1.66414607

You are going to take some numbers as an input from a file. You need to witer a program to find longest increasing sequence. You should process it as soon as you are taking an input. After finishing the last input immediately you should be able to tell the sequence.
Input: 1 5 3 4 6 4
Output: 3 4 6

1.66383159

Write a function to take two arbitrarily long numbers in the form of Strings and multiply them, returning another String with the product.

1.65763283

Each key on the telephone represents a list of letters. Given a telephone number, please write a program to output all the possible strings the telephone number represents.

1.65664244

Intersection of n sets without using a hash table.

1.64929736

Given a list of n objects, write a function that outputs the minimum set of numbers that sum to at least K. FOLLOW UP: can you beat O(n ln n)?

1.63787174

Fibonacci Numbers – Iteratively and Recursively

1.63617706

Questions on probability and expected return.

1.63587451

If you had a chance to present ideas for new initiatives to senior management, what would those ideas be?

1.633918

Suppose you have a matrix of numbers. How can you easily compute the sum of any rectangle (i.e. a range [row_start, row_end, col_start, col_end]) of those numbers? How would you code this?

1.63296568

How to implement multiple inheritance in Java

1.62931561

“Assume that Facebook is not blocked in China. What marketing strategies would you recommend to expand our user base in China?”

1.62187684

Write a code to convert an ASCII representation of a positive integer to it’s numeric value.

1.62128747

Write a C function to define strstr(char *haystack, char * needle) to return the first occurrence of needle in haystack. Code must compile and execute.

1.61357486

… be prepared to write real code on a while board on on-line editor.

1.5874263

3SUM problem

1.58052683

Modify the code to be used on a circular array of data.

1.57802439

Give a possitive/negative example of a time you worked in a team atmosphere and what lessons you learned as a result.

1.57672119

Describe a moment where you showed leadership on a team.

1.57592571

Given a matrix print it clockwise from the first element to the very inner element.

1.574578

Explain the difference between a LEFT and RIGHT SQL JOIN

1.57037413

Given a String containing java-script assets, write a parser which will output the String with proper indentation.

1.569481

Write a class providing an LRU cache

1.556796

Given a matrix of numbers in which some may be zero. If a cell contains a zero, set all the cells in the corresponding column and row to zero.

1.55262029

First question: for a random-ordered bucket of numbers 1 through 3000 with one number missing, how would you detect which number is missing?

1.55248618

Given a telephone number, find all the permutations of the letters assuming 1=abc, 2=def, etc.

1.548787

Given a collection of words, return a collection of anagrams found in the
given collection

1.54775989

I need someone who can manage my calendar….

1.54433393

Find a needle in the haystack: given two c-strings (null terminated), return a pointer to the location of where the needle occurs in the haystack, NULL otherwise.

1.54125547

It’s 6pm and your work day is over, what happened during the day that made it awesome?

You have two lightbulbs and a 100-storey building. You want to find the floor at which the bulbs will break when dropped. Find the floor using the least number of drops.

1.50730193

No hard questions asked – most was easy dialogue about their product.

1.49844253

what can FB do to beat its competitors in my country, where it is not the most popular social network.

1.496508

Given an API call that returns a null value and no error message, how would you go about troubleshooting the problem?

1.49575114

How will you design facebook newsfeed. Focus was on a design which could handle the huge number of status updates and display them on each of the user’s friend’s wall.

1.49565673

How would add new Facebook members to the database of members, and code their relationships to others in the database?

1.49262416

How would you print a large, balanced degree-bound tree in breadth first order, using only O(1) space?

1.49101746

Are you a designer or developer? You can’t possibly be both. It’s incomprehensible.

1.485411

FInd the maximum sum of a sub-sequence from an positive integer array where any two numbers of sub-sequence are not adjacent to each other in the original sequence. E.g 1 2 3 4 5 6 –> 2 4 6

1.48452055

Write a function that finds the minimum and maximum values within an unsorted array using divide-and-conquer.

1.48186624

Write a function that takes in a roman numeral string and returns its decimal value. You may assume input is a valid roman numeral.

1.48092175

How would the total credit points of a user be calculated based on my design?

1.46958888

Given set of coins and each coin has its unique probability to be head up, say double[] probs stores the probability values for all coins, print out all different cases and accordingly probability.

1.46660042

Implement a power function to raise a double to an int power, including negative powers.

1.4639076

Pass a list of word to a function
[car, rats, arc, star]
and have the function group the words which are anagrams of eachother.

1.45008373

Given two events, each with a start and end time, implement a boolean check to see if they overlap.

1.44554853

Advantages of setting up new branches of Facebook at different locations?

1.43173516

I was asked to diagnose an actual problem they were having with a database. I was given access to their performance visualization tools so I could see the DB’s vital signs. I was asked to explain why a spike in DB response time occurred at a specific time (as shown on a graph). I was able to log into the database and examine statistics and performance counters, but the best tools were their extensive graphs.

1.42579293

previous emplyoment

1.42045116

what is Facebooks value proposition to advertisers?

1.41860485

Implement atof function. eg., +3.5e-2, .03e1, 1e1, 0.0

1.41655612

Build a model to create a database of any and all possible nicknames for every user’s given name.

1.41602373

How would you implement a method to tell whether or not a string matches a regex that consists of lower case letters and *s.

1.41071069

In sudo-code write a program that takes an integer called N and prints out the Fibonacci sequence to the Nth digit.

1.40933847

Implement a LRU(Least Recently Used) cache

1.40144777

Complexity of Bubble sort

1.39885628

Not revealing questions due to NDA.

1.39697862

If the above two arrays are very long, but only few elements are valid. Please do the same task in the question 1 but without creating new array.

1.39562368

There was none. All questions were pretty much in line with the job and was expected.

1.390355

Write the actual code to parse a regular expression including “*”, which stands for 0 or more characters, “+”, which stands for 1 or more characters, and “.”, which stands for 1 exact character.

1.38958681

Implement division without using multiplication or division. It should work most efficient and fast.

1.379275

Read in text from a text file or stdin and tally the most common words. Output, in order, the most common words present in the file.

1.37800443

There were some questions that I could not answer directly due to confidentiality issues to protect my current company.

1.36684608

Design the Facebook Credit system which is a application where users can buy/trade virtual currency and can use the virtual currency to purchase Facebook services, like paid apps.

1.35551

Given a set of inputs in a log file:

log:
example:
1,2
1,1
2,1
3,1
1,2

out:
1,2
2,1
3,1

The output should be all the unique numbers and the count associated with them.

1.35426044

Design a database schema that can be used for ad hoc analysis of Facebook mobile apps.

1.35151124

Decribe your favourite feature/application. Try to write it as a letter/email to a user asking for your advice.

1.35037136

Questions on the Look-and-Say sequence. Google it.

1.35004377

What is the command to display a routing table?

1.338085

Given a score S, and individual points p1,p2,…,pn. give all combinations of p that add up to s.

1.33775687

Cultural fit

1.33591044

Describe something that you’re an expert in.

1.33501649

Asked a lot of things regarding “what if” and “what if not” . . . They wanted to see where i was headed in life. Very specific to my CV and accomplishments till now.

1.32678914

What type of DNS records are there?

1.32125747

Technical background

1.31057155

Standard coding problems

1.29966664

Design a system to detect typos and provide suggestions to users.

1.29952729

How to sort 5TB of data using 5GB of memory?
Do it efficiently: RAM CPU, CACHE.

1.29601943

Given a set of non-overlapping integer ranges (1,3) (5,8), etc., and an input integer, what is the best way to organize the data and allow for quick search based on the input, etc.

1.28358889

You are given intervals of contiguous integers, like [1, 10), [15, 25), [40, 50), which are non-overlapping and of a fixed size.
Design a data structure to store these intervals and have the operations of insert, delete, and find functions

1.27993333

Scheduling question: What might be the problem with awards ads to the highest bidder, and how could we improve our revenue by doing something else?

1.27953422

Calculate x ^ y in O(log n)

1.27643216

Implement a function
char* readLine();
which returns single lines from a buffer. To read the buffer, you can makes use of a function
int read(char* buf, int len)
which fills buf with upto len chars and returns the actual number of chars filled in. Function readLine can be called as many times as desired. If there is no valid data or newline terminated string available, it must block. In order to block, it can use read function which in turn will block when it doesn’t have anything to fill the buf.

1.27600574

Implement a suggestion function that generates alternative strings for given password strings like “facebook” => “F@ceß00k” and “fæc€Bo0K” or sth.

1.2756263

I don’t know because I couldn’t hear the guy because his accent and his phone were so terrible. It was something about processing an array of strings in some special way.

1.26903331

giving lots of intervals [ai, bi], find a point intersect with the most number of intervals.

1.26503527

Given n+1 buckets with n of them with ball inside and move(a,b) function, that moves ball from bucket a to bucket b. Each ball has a different number from [1,n] on it. Move balls, so each bucket has a ball with matching number in it.

1.263547

Check a number of hosts for a specific daemon and report the hosts where it is not running.

1.26157367

Implement a function string balanceParanthesis(string s); which given a string s consisting of some parenthesis returns a string s1 in which parenthesis are balanced and differences between s and s1 are minimum.
Eg – “(ab(xy)u)2)” -> “(ab(xy)u)2”
“)))(((” -> “”

1.251312

Two other questions were similar to the ones posted by others who underwent FB interviews. So not repeating them.

1.25078785

use stack to pop out the max num under O(1)

1.248423

write a C function to define strcmp(char *s1, char *s2) to return negative if s1 is smaller, positive if s2 is greater and 0 if they are equal.

1.24608994

What’s the maximum theoretical number of TCP connections a host may have open?

1.23878753

Explain the features of various offerings provided by facebook to its client to enable them to advertise better.

1.22507453

given the utitlies getFriend(User u) and areFriends(User u1, User u2), write the function which takes as parameter the array of users and return a bool saying if you can divide the users in 2 groups s.t. if u1 and u2 both belong to a certain group, they are not friends.

1.22104311

Ribosome test

1.21859348

Find the min and max in an array. Now do it in less than 2n comparisons. (they were looking for the solution that finds both max and min in about 3/2 n comparisons).

1.21390545

5 year goals in the company

1.20543373

How to do a dot product (or other operations) on very very big vectors? (migh be very sparse and of unequal lenghts)
Data structures with discution, clean algorithm, extensible if some relations are known.

1.19227624

Given a certain state of an Othelo game board, location on the board, a certain piece to place on the given location, update the board and make the required validations

1.19099474

Programming test, take an arbitrary text input and transform it to a specified data format.

1.18667185

Given a matrix with 1’s and 0’s, find the number of groups of 1’s. A group is defined by horiz/vertically adjacent 1’s.

1.1789993

Explain to a user why he/she does have to provide his/her real name to set up an account.

1.17515671

You are trying to rob houses on a street. Each house has some +ve amount of cash. Your goal is to rob houses such that you maximize the total robbed amount. The constraint is once you rob a house you cannot rob a house adjascent to that house.

1.17143548

Compute the square root of a number down to a certain precision.
ie sqrt(num, precision) returns a number that is in-between sqrt(num) – precision and sqrt(num) + precision.

1.171002

Translate the following text into the foreign language you wish to support. Be sure to write it in a tone that would be appropriate for customer service.

1.17098176

1. Pick a product on Facebook. Please describe the logical data model for related fact and dimension tables, the aggregation tables you’d want to build for analytics, and the dashboard you’d build to monitor the product.

Given a 1TB file of serialized 4 byte integers, and 2GB of ram, sort the integers into a resulting 1TB file. My interviewer was very collaborative in entertaining various solution ideas until we came up with a combo that would work performantly and reduce the number of passes over the 1TB file and intermediate files.

1.13278782

Optimize the algorithm suggested above

1.12271166

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

1.11006045

25 racehorses, no stopwatch. 5 tracks. Figure out the top three fastest horses in the fewest number of races.

1.09770429

Write HTML/CSS to duplicate the behavior of the profile image in a facebook profile. When mouse over, a “edit image” link should display in the corner, and hide on mouse out.