Upload Button Icon Add office photos

Meta

Compare button icon Compare button icon Compare

Filter interviews by

Meta Software Engineer Interview Questions and Answers

Updated 21 Jun 2025

12 Interview questions

A Software Engineer was asked 1mo ago
Q. Given an integer array nums and an integer k, return the kth largest element in the array.
Ans. 

Find the Kth largest element in an unsorted array using various methods.

  • Use a max-heap to extract the largest elements until reaching K. Example: For [3, 2, 1, 5, 6, 4] and K=2, result is 5.

  • Sort the array in descending order and return the K-1 index. Example: For [3, 2, 1, 5, 6, 4] and K=2, sorted array is [6, 5, 4, 3, 2, 1].

  • Use Quickselect algorithm for average O(n) time complexity. Example: For [3, 2, 1, 5, 6, 4...

A Software Engineer was asked 1mo ago
Q. Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get(key) - Get the value (will always be positive) of the key if the key exists in the ...
Ans. 

Implement an LRU (Least Recently Used) cache to efficiently store and retrieve data with limited capacity.

  • Use a hash map for O(1) access to cache items.

  • Use a doubly linked list to maintain the order of usage.

  • When adding a new item, check if it exceeds capacity; if so, remove the least recently used item.

  • Example: If cache capacity is 2, adding (1,1) and (2,2) then (3,3) removes (1,1).

  • Implement 'get' and 'put' metho...

Software Engineer Interview Questions Asked at Other Companies

asked in Qualcomm
Q1. Four people need to cross a bridge at night with only one torch t ... read more
asked in Capgemini
Q2. In a dark room, there is a box of 18 white and 5 black gloves. Yo ... read more
Q3. Tell me something about yourself. Define encapsulation. What is i ... read more
asked in Paytm
Q4. Puzzle : 100 people are standing in a circle .each one is allowed ... read more
asked in TCS
Q5. Find the Duplicate Number Problem Statement Given an integer arra ... read more
A Software Engineer was asked 1mo ago
Q. Return the longest palindromic string that can be formed by removing any set of characters from a given string. If there are multiple palindromic strings of the same maximum length, return the one that is i...
Ans. 

Find the longest palindromic subsequence from a string, ensuring lexicographical order for ties.

  • A palindrome reads the same forwards and backwards, e.g., 'racecar'.

  • Use dynamic programming to find the longest palindromic subsequence.

  • Example: For 'abcbda', the longest palindromic subsequence is 'aba'.

  • If multiple longest palindromes exist, return the lexicographically smallest one, e.g., 'aa' from 'aabbaa'.

A Software Engineer was asked 8mo ago
Q. How would you represent a sparse matrix?
Ans. 

A sparse matrix can be represented using a dictionary of dictionaries or a list of lists.

  • Use a dictionary of dictionaries where the keys are the row and column indices with non-zero values as values.

  • Alternatively, use a list of lists where each inner list represents a row with non-zero values and their column indices.

  • Sparse matrices are efficient for large matrices with mostly zero values.

  • Example: {0: {1: 5, 3: 7}...

A Software Engineer was asked 8mo ago
Q. How would you efficiently calculate the sum of such a matrix?
Ans. 

Efficiently calculate the sum of a matrix

  • Iterate through each element in the matrix and add them to a running total

  • Use parallel processing or multi-threading to calculate the sum faster

  • Consider using optimized algorithms like Strassen's algorithm for matrix multiplication

A Software Engineer was asked 8mo ago
Q. Design a metrics tracker.
Ans. 

A metrics tracker to monitor and analyze key performance indicators

  • Define the key metrics to track (e.g. user engagement, conversion rates)

  • Implement a data collection system to gather relevant data

  • Create visualizations and reports to analyze the metrics

  • Set up alerts for abnormal metric values

  • Regularly review and update the metrics based on business goals

Meta HR Interview Questions

9 questions and answers

Q. Can you describe a project you worked on in your last organization, the approach ... read more
Q. Were you involved in negotiations or discussions with stakeholders outside your ... read more
Q. Why did you leave your previous company?
A Software Engineer was asked 11mo ago
Q. Given a binary search tree, find the path from the root to a leaf node that has the maximum sum of node values. Return the sum.
Ans. 

Find the maximum sum path from root to leaf in a binary search tree.

  • A binary search tree (BST) is a tree data structure where each node has at most two children.

  • To find the max sum path, traverse from the root to each leaf node, calculating the sum along the way.

  • Use a recursive approach to explore each path, keeping track of the maximum sum encountered.

  • Example: For a BST with values 10, 5, 15, 3, 7, the max sum pa...

Are these interview questions helpful?
A Software Engineer was asked 11mo ago
Q. Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An input string is valid if: Open brackets must be closed by the same type of brackets....
Ans. 

Use a stack to ensure balanced parenthesis in a string

  • Iterate through each character in the string

  • If the character is an opening parenthesis, push it onto the stack

  • If the character is a closing parenthesis, pop from the stack and check if they match

  • If at the end the stack is empty, the parenthesis are balanced

A Software Engineer was asked 12mo ago
Q. Design Instagram.
Ans. 

Design a social media platform for sharing photos and videos with features for user interaction and content discovery.

  • User Profiles: Each user has a profile with a bio, profile picture, and a grid of their uploaded photos.

  • Feed Algorithm: A personalized feed that shows posts from followed users, using engagement metrics to prioritize content.

  • Photo Upload: Users can upload photos/videos, apply filters, and add capti...

A Software Engineer was asked
Q. Implement a function to convert a string to an integer.
Ans. 

Convert a string representation of an integer into its numeric form, handling edge cases and invalid inputs.

  • Use Integer.parseInt() in Java or int() in Python to convert strings to integers.

  • Handle leading/trailing spaces: ' 123' should become 123.

  • Manage invalid inputs: 'abc' should return an error or 0.

  • Consider overflow: '2147483648' exceeds the range of a 32-bit integer.

Meta Software Engineer Interview Experiences

18 interviews found

Interview experience
5
Excellent
Difficulty level
Hard
Process Duration
2-4 weeks
Result
Not Selected

I applied via Approached by Company and was interviewed in May 2024. There were 3 interview rounds.

Round 1 - Coding Test 

60m, DSA (graphs, trees, etc.)

Round 2 - Technical 

(2 Questions)

  • Q1. How would you represent a sparse matrix?
  • Q2. How would you efficiently calculate the sum of such a matrix?
Round 3 - Technical 

(2 Questions)

  • Q1. Design a metrics tracker
  • Q2. Leetcode-style DSA

Skills evaluated in this interview

Interview experience
2
Poor
Difficulty level
Hard
Process Duration
Less than 2 weeks
Result
Not Selected

I appeared for an interview in Dec 2024, where I was asked the following questions.

  • Q1. Return the longest palindromic string that can be formed by removing any set of characters from a given string. If there are multiple palindromic strings of the same maximum length, return the one that is ...
  • Ans. 

    Find the longest palindromic subsequence from a string, ensuring lexicographical order for ties.

    • A palindrome reads the same forwards and backwards, e.g., 'racecar'.

    • Use dynamic programming to find the longest palindromic subsequence.

    • Example: For 'abcbda', the longest palindromic subsequence is 'aba'.

    • If multiple longest palindromes exist, return the lexicographically smallest one, e.g., 'aa' from 'aabbaa'.

  • Answered by AI
  • Q2. The second was simple, return a clone of a graph.
  • Ans. 

    Clone a graph by creating a deep copy of its nodes and edges.

    • Use Depth-First Search (DFS) or Breadth-First Search (BFS) for traversal.

    • Maintain a mapping of original nodes to their clones to avoid duplicates.

    • For each node, create a new node and copy its neighbors.

    • Example: For a graph with edges 1-2, 1-3, clone it to have 1'-2', 1'-3'.

  • Answered by AI
Interview experience
5
Excellent
Difficulty level
Hard
Process Duration
2-4 weeks
Result
Not Selected

I applied via LinkedIn and was interviewed in Apr 2024. There were 2 interview rounds.

Round 1 - Coding Test 

DSA, java, python, basic problem solving

Round 2 - One-on-one 

(2 Questions)

  • Q1. Tell me about yourself
  • Ans. 

    I'm a passionate software engineer with a strong background in full-stack development and a love for solving complex problems.

    • Graduated with a degree in Computer Science from XYZ University.

    • Worked at ABC Corp, where I developed a web application that improved user engagement by 30%.

    • Proficient in languages like JavaScript, Python, and Java, with experience in frameworks such as React and Django.

    • Enjoy collaborating in ag...

  • Answered by AI
  • Q2. Why did you leave your previous company
  • Ans. 

    I left my previous company to seek new challenges and opportunities for growth in a more innovative environment.

    • I was looking for a role that offered more opportunities for professional development.

    • The company culture was not aligned with my values, particularly regarding collaboration and innovation.

    • I wanted to work on more cutting-edge technologies that were not available in my previous role.

    • I felt that I had reached...

  • Answered by AI

Interview Preparation Tips

Interview preparation tips for other job seekers - Be well prepared
Interview experience
4
Good
Difficulty level
Moderate
Process Duration
2-4 weeks
Result
Not Selected

I appeared for an interview in Dec 2024, where I was asked the following questions.

  • Q1. Kth largest element in an array
  • Ans. 

    Find the Kth largest element in an unsorted array using various methods.

    • Use a max-heap to extract the largest elements until reaching K. Example: For [3, 2, 1, 5, 6, 4] and K=2, result is 5.

    • Sort the array in descending order and return the K-1 index. Example: For [3, 2, 1, 5, 6, 4] and K=2, sorted array is [6, 5, 4, 3, 2, 1].

    • Use Quickselect algorithm for average O(n) time complexity. Example: For [3, 2, 1, 5, 6, 4] and...

  • Answered by AI
  • Q2. LRU Cache - Implement an LRU cache
  • Ans. 

    Implement an LRU (Least Recently Used) cache to efficiently store and retrieve data with limited capacity.

    • Use a hash map for O(1) access to cache items.

    • Use a doubly linked list to maintain the order of usage.

    • When adding a new item, check if it exceeds capacity; if so, remove the least recently used item.

    • Example: If cache capacity is 2, adding (1,1) and (2,2) then (3,3) removes (1,1).

    • Implement 'get' and 'put' methods fo...

  • Answered by AI
Interview experience
4
Good
Difficulty level
Hard
Process Duration
Less than 2 weeks
Result
Not Selected

I applied via Job Portal and was interviewed in Mar 2024. There was 1 interview round.

Round 1 - One-on-one 

(2 Questions)

  • Q1. Is a valid decimal
  • Ans. 

    A valid decimal is a number that can be expressed in decimal notation, including integers and fractions.

    • A valid decimal can include digits before and after a decimal point, e.g., 12.34.

    • It can also be a whole number, e.g., 5 or 0.

    • Leading zeros are allowed, e.g., 0.5 or 00.75.

    • Invalid examples include '12.34.56' or 'abc.12'.

  • Answered by AI
  • Q2. Return the substring in a main string, which is composition of given string
  • Ans. 

    Find and return all substrings in a main string that match a given string.

    • Iterate through the main string and check for matches with the given string

    • Use substring function to extract potential matches

    • Store all matching substrings in an array and return it

  • Answered by AI

Interview Preparation Tips

Interview preparation tips for other job seekers - 45 mins interview. 2 interview questions, 1st one easy, 2nd one is leet code medium. Solving with in the time is important. I couldn't able to complet the 2nd one.
Interview experience
3
Average
Difficulty level
Moderate
Process Duration
2-4 weeks
Result
Not Selected

I applied via Company Website and was interviewed in Feb 2024. There were 2 interview rounds.

Round 1 - Coding Test 

Standard data structure and algorithms round. 2 questions to solve in 45 minutes

Round 2 - One-on-one 

(2 Questions)

  • Q1. Binary Search Tree - Root to leaf max sum path
  • Ans. 

    Find the maximum sum path from root to leaf in a binary search tree.

    • A binary search tree (BST) is a tree data structure where each node has at most two children.

    • To find the max sum path, traverse from the root to each leaf node, calculating the sum along the way.

    • Use a recursive approach to explore each path, keeping track of the maximum sum encountered.

    • Example: For a BST with values 10, 5, 15, 3, 7, the max sum path is...

  • Answered by AI
  • Q2. Make balanced parenthesis

Skills evaluated in this interview

Interview experience
5
Excellent
Difficulty level
-
Process Duration
-
Result
-
Round 1 - Coding Test 

BFS and DFS and graph problems are asked often

Interview experience
4
Good
Difficulty level
-
Process Duration
-
Result
-
Round 1 - Coding Test 

Most frequent element
insert in sorted rotated array

Software Engineer Interview Questions & Answers

user image Cory Parrish

posted on 24 Oct 2024

Interview experience
5
Excellent
Difficulty level
-
Process Duration
-
Result
-
Round 1 - One-on-one 

(1 Question)

  • Q1. Conflict quetsions
Interview experience
4
Good
Difficulty level
Hard
Process Duration
6-8 weeks
Result
Not Selected

I applied via Approached by Company and was interviewed in Apr 2024. There was 1 interview round.

Round 1 - Technical 

(1 Question)

  • Q1. Clean maze with Robot
  • Ans. 

    Clean maze using a robot by navigating through paths and avoiding obstacles.

    • Create a map of the maze with obstacles and paths.

    • Implement a pathfinding algorithm for the robot to navigate through the maze.

    • Use sensors or algorithms to detect and avoid obstacles.

    • Track the robot's progress and clean the maze efficiently.

  • Answered by AI

Skills evaluated in this interview

Top trending discussions

View All
Interview Hub
2w (edited)
a team lead
Why are women still asked such personal questions in interview?
I recently went for an interview… and honestly, m still trying to process what just happened. Instead of being asked about my skills, experience, or how I could add value to the company… the questions took a totally unexpected turn. The interviewer started asking things like When are you getting married? Are you engaged? And m sure, if I had said I was married, the next question would’ve been How long have you been married? What does my personal life have to do with the job m applying for? This is where I felt the gender discrimination hit hard. These types of questions are so casually thrown at women during interviews but are they ever asked to men? No one asks male candidates if they’re planning a wedding or how old their kids are. So why is it okay to ask women? Can we please stop normalising this kind of behaviour in interviews? Our careers shouldn’t be judged by our relationship status. Period.
Got a question about Meta?
Ask anonymously on communities.

Meta Interview FAQs

How many rounds are there in Meta Software Engineer interview?
Meta interview process usually has 1-2 rounds. The most common rounds in the Meta interview process are Coding Test, Technical and One-on-one Round.
What are the top questions asked in Meta Software Engineer interview?

Some of the top questions asked at the Meta Software Engineer interview -

  1. How would you efficiently calculate the sum of such a matr...read more
  2. Return the longest palindromic string that can be formed by removing any set of...read more
  3. Return the substring in a main string, which is composition of given str...read more
How long is the Meta Software Engineer interview process?

The duration of Meta Software Engineer interview process can vary, but typically it takes about 2-4 weeks to complete.

Tell us how to improve this page.

Overall Interview Experience Rating

4.1/5

based on 20 interview experiences

Difficulty level

Easy 8%
Moderate 42%
Hard 50%

Duration

Less than 2 weeks 25%
2-4 weeks 58%
6-8 weeks 8%
More than 8 weeks 8%
View more
Meta Software Engineer Salary
based on 23 salaries
₹34.3 L/yr - ₹60 L/yr
408% more than the average Software Engineer Salary in India
View more details

Meta Software Engineer Reviews and Ratings

based on 8 reviews

4.5/5

Rating in categories

4.7

Skill development

3.2

Work-life balance

4.9

Salary

2.9

Job security

4.0

Company culture

4.3

Promotions

4.2

Work satisfaction

Explore 8 Reviews and Ratings
Software Engineer
23 salaries
unlock blur

₹34.3 L/yr - ₹60 L/yr

Senior Dft Engineer
22 salaries
unlock blur

₹30 L/yr - ₹39 L/yr

Senior Software Engineer
19 salaries
unlock blur

₹40.5 L/yr - ₹75.6 L/yr

Software Developer
18 salaries
unlock blur

₹33.2 L/yr - ₹62 L/yr

Data Scientist
12 salaries
unlock blur

₹32 L/yr - ₹54.7 L/yr

Explore more salaries
Compare Meta with

Google

4.3
Compare

Reliance Communications

4.0
Compare

Henry Harvin Education

3.8
Compare

GAO Tek

4.4
Compare
write
Share an Interview