Filter interviews by
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...
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...
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 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}...
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 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
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...
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
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...
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.
I applied via Approached by Company and was interviewed in May 2024. There were 3 interview rounds.
60m, DSA (graphs, trees, etc.)
I appeared for an interview in Dec 2024, where I was asked the following questions.
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'.
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'.
I applied via LinkedIn and was interviewed in Apr 2024. There were 2 interview rounds.
DSA, java, python, basic problem solving
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...
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...
I appeared for an interview in Dec 2024, where I was asked the following questions.
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...
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...
I applied via Job Portal and was interviewed in Mar 2024. There was 1 interview round.
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'.
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
I applied via Company Website and was interviewed in Feb 2024. There were 2 interview rounds.
Standard data structure and algorithms round. 2 questions to solve in 45 minutes
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...
BFS and DFS and graph problems are asked often
Most frequent element
insert in sorted rotated array
I applied via Approached by Company and was interviewed in Apr 2024. There was 1 interview round.
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.
Top trending discussions
Some of the top questions asked at the Meta Software Engineer interview -
The duration of Meta Software Engineer interview process can vary, but typically it takes about 2-4 weeks to complete.
based on 20 interview experiences
Difficulty level
Duration
based on 8 reviews
Rating in categories
Software Engineer
23
salaries
| ₹34.3 L/yr - ₹60 L/yr |
Senior Dft Engineer
22
salaries
| ₹30 L/yr - ₹39 L/yr |
Senior Software Engineer
19
salaries
| ₹40.5 L/yr - ₹75.6 L/yr |
Software Developer
18
salaries
| ₹33.2 L/yr - ₹62 L/yr |
Data Scientist
12
salaries
| ₹32 L/yr - ₹54.7 L/yr |
Reliance Communications
Henry Harvin Education
GAO Tek