Facebook Interview Question for Software Engineer / Developers


Country: -




Comment hidden because of low score. Click to expand.
2
of 2 vote

Is it a human mouth? an open mouth or a closed mouth? Is a mouth guaranteed to be present or not? If so how many mouths can exist in a single picture? Is the picture always in a particular orientation. These are some questions that could be asked as clarification.

- @future googler 2 September 17, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

good questions.

- Anonymous November 02, 2011 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

Is the rest of the face also on the picture (eyes, nose)?

- Safi December 12, 2014 | Flag
Comment hidden because of low score. Click to expand.
1
of 1 vote

An automatic face morphing algorithm is proposed. The algorithm automatically extracts feature points on the face, and based on these feature points images are partitioned and face morphing is performed. The algorithm has been used to generate morphing between images of faces of different people as well as between different images of the face of an individual. The results of both inter- and intra-personal morphing are subjectively satisfactory.

ref-->/
ccrma.stanford.edu/~jacobliu/368Report/index.html

- saurabh February 16, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 2 vote

This can be solved using graphs.
1) each pixel in the image would represent a vertex in a graph with an edge between 2 neighboring pixels. The weight of the edge should be proportional to the darkness of the pixel.
2) identify different connected components (eye, node, mouth) in the image using spanning tree algorithm.
3) the last of the puzzle is to identify which of the connected component is the mouth. each connected component (eye, nose, mouth, etc) would be represented as a vertex in a graph and the edge weight is proportional to their distance from each other. using shortest path, you can identify 2 pair of eyes and the component that is farthest from the eyes is the mouth.

- future googler September 10, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

1) "The weight of the edge should be proportional to the darkness of the pixel." you said the VERTEX represents the pixel. So which pixels' darkness did you mean when mentioning edge weight?
2) "an edge between 2 neighboring pixels" based on this you will have no separate islands in the graph; but one single component. So why the spanning tree algorithm?

Your solution doesn't make any sense to me.

- Safi December 12, 2014 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

@future googler: it is not mentioned that the picture will have a full face. It can be only lips in the picture. I think different approach is needed. One basic property of lips is two points having three different lines touching them. I think if we consider a graph with nodes as pixels. Then each pair would have three lines where lines starting from one point would end in the other. Probably lines have different properties which can be figured out. I this can be one point to be considered. Also, the pair of points could be eyes too. These are just my thoughts.
Note that I don't have a solution/algorithm/design right now.

- Victor September 11, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
-2
of 2 vote

Viola Jones ....

- Anonymous September 21, 2011 | Flag Reply


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More