Facebook Software Engineer Mock Interview

Practice 26 Facebook Software Engineer interview questions covering algorithms, system design, and coding challenges.

WRITTEN BY WILLIAM SWANSEN
QUESTION 14 OF 26

What are the differences between an array and a stack?

This technical question is asking you to compare two concepts used in the role of a Facebook software engineer. When comparing two concepts, you should first define each of them and then discuss how they differ. It may be helpful if you provide examples of how the concepts are used and the work you do to demonstrate your understanding of the subject matter.

"A stack is a data structure that utilizes the last in, first out principle for presenting data to the application. On the other hand, an array doesn't have a fixed structure for how data is added or retrieved by the application. A stack may be used in an application that requires the most recent data to be presented first. An array can be used to retrieve any of the data, regardless of when it was added to the application."

William Swansen
26 QUESTIONS & ANSWERS · FACEBOOK
See membership