Filter interviews by
Ninja is adventurous and loves traveling while being mindful of his expenses. Given a set of 'N' stations connected by 'M' trains, each train starting from station 'A' and re...
The task is to find the cheapest price from the given source to destination with up to K stops.
Read the number of test cases
For each test case, read the number of stations and trains
Read the details of each train (source, destination, ticket price)
Read the source station, destination station, and maximum number of stops
Implement a graph data structure to represent the stations and trains
Use a modified version of D...
Given a 2-dimensional binary matrix called Mat
of size N x M that consists solely of 0s and 1s, find the length of the longest path from a specified source cell to a destinat...
Find the length of the longest path from a source cell to a destination cell in a binary matrix.
Use depth-first search (DFS) to explore all possible paths from source to destination.
Keep track of visited cells to avoid revisiting them.
Return the length of the longest path found, or -1 if no path exists.
Given a directed graph with a specified number of vertices V
and edges E
, your task is to calculate the total number of distinct paths from a given source node S
to all oth...
Calculate the total number of distinct paths from a given source node to all other nodes in a directed graph.
Use dynamic programming to keep track of the number of paths from the source node to each node in the graph.
Consider using modular arithmetic to handle large numbers and prevent overflow.
Start by initializing the number of paths from the source node to itself as 1.
Iterate through the edges of the graph and ...
Given an array of integers ARR
and an integer K
, determine the rank of the element ARR[K]
.
The rank of any element in ARR
is defined as the number of eleme...
Determine the rank of an element in an array based on preceding smaller elements.
The rank of ARR[K] is the count of elements smaller than ARR[K] before index K.
Example: For ARR = [6, 2, 9, 7] and K = 3, ARR[K] = 7. Elements before it are [6, 2], so rank = 2.
Iterate through the array from index 0 to K-1 to count smaller elements.
Consider edge cases: if K = 0, rank is always 0 since there are no elements before it.
Given a rotated sorted array ARR
of size 'N' and an integer 'K', determine the index at which 'K' is present in the array.
1. If 'K' is not present ...
Given a rotated sorted array, find the index of a given integer 'K'.
Use binary search to find the pivot point where the array is rotated.
Then perform binary search on the appropriate half of the array to find 'K'.
Handle cases where 'K' is not present in the array by returning -1.
Design a data structure for a Least Recently Used (LRU) cache that supports the following operations:
1. get(key)
- Return the value of the key if it exists in the cache; otherwi...
Design a Least Recently Used (LRU) cache data structure that supports get and put operations with capacity constraint.
Implement a doubly linked list to maintain the order of recently used keys.
Use a hashmap to store key-value pairs for quick access.
Update the order of keys in the linked list on get and put operations.
Evict the least recently used key when the cache reaches its capacity.
You are provided with 'N' intervals, each containing two integers denoting the start time and end time of the interval.
Your task is to merge all overlapping intervals an...
Merge overlapping intervals and return sorted list of merged intervals.
Sort the intervals based on start times.
Iterate through intervals and merge overlapping intervals.
Return the merged intervals in sorted order.
You are provided with a number of courses 'N', some of which have prerequisites. There is a matrix named 'PREREQUISITES' of size 'M' x 2. This matrix indicates that for...
Given courses with prerequisites, determine a valid order to complete all courses.
Use topological sorting to find a valid order of courses.
Create a graph with courses as nodes and prerequisites as edges.
Start with courses that have no prerequisites and remove them from the graph.
Continue this process until all courses are taken or there are no valid courses left.
If there is a cycle in the graph, it is impossible t...
Given an array of integers with 'N' elements, determine the length of the longest subsequence where each element is greater than the previous element. This ...
Find the length of the longest strictly increasing subsequence in an array of integers.
Use dynamic programming to solve this problem efficiently.
Initialize an array to store the length of the longest increasing subsequence ending at each index.
Iterate through the array and update the length of the longest increasing subsequence for each element.
Return the maximum value in the array as the result.
You are given a sorted integer array ARR
of size N
. Your task is to remove the duplicates in such a way that each element appears only once. The output...
Remove duplicates from a sorted array in-place with O(1) extra memory.
Use two pointers - one for iterating through the array and another for placing unique elements.
Compare current element with next element to identify duplicates and skip them.
Update array in-place by moving unique elements to the front.
Return the length of the array after removal of duplicates.
Effective social media strategies can help manage communication and engagement during a pandemic situation.
Increase transparency: Share regular updates about the situation and your organization's response, like how companies like Zoom communicated their service updates.
Engage with the community: Use social media to foster a sense of community, as seen with brands hosting virtual events or challenges.
Provide valuable co...
Nations implemented various actions during the pandemic, focusing on public health, economic support, and social measures.
Lockdowns and stay-at-home orders to curb virus spread.
Increased funding for healthcare systems and vaccine development.
Public health campaigns promoting hygiene and social distancing.
Economic stimulus packages to support businesses and individuals.
Remote work policies and digital transformation in ...
I applied via Company Website and was interviewed in Jun 2024. There was 1 interview round.
I have implemented various technical improvements in codes to enhance performance and functionality.
Implemented caching mechanisms to reduce load times
Optimized database queries for faster retrieval of data
Introduced error handling techniques to improve code reliability
Utilized design patterns to make the codebase more maintainable
Refactored legacy code to adhere to best practices
I applied via LinkedIn and was interviewed in Jul 2024. There was 1 interview round.
I want to join Facebook because of its innovative technology, global impact, and opportunities for growth.
Innovative technology: Facebook is known for its cutting-edge technology and constant innovation.
Global impact: Working at Facebook would allow me to contribute to a platform that connects billions of people worldwide.
Opportunities for growth: Facebook offers a dynamic and fast-paced work environment with ample opp...
I appreciate the personalized news feed feature on Facebook.
Personalized news feed shows content based on user interests
Helps users stay updated on relevant information
Allows users to engage with content they are interested in
I applied via AmbitionBox and was interviewed before Oct 2023. There were 8 interview rounds.
Yoga and meditation enhance body, mind, and soul, promoting overall well-being and spiritual growth for everyone.
Yoga improves physical flexibility, allowing for better movement and reduced injury risk.
Meditation enhances mental clarity and emotional stability, fostering a peaceful mind.
Practicing yoga can boost immunity by reducing stress and promoting relaxation.
Spirituality through yoga connects individuals to their...
The body has 33 vertebrae, 7 chakras, and intricate systems for breath and energy flow.
The spinal cord consists of 33 vertebrae, providing structure and support.
There are 7 main chakras, each associated with different physical and emotional aspects.
The body has 72,000 nadis (energy channels) that facilitate the flow of prana (life force).
Breathing occurs approximately 21,600 times a day, influencing physical and mental...
I would like to teach a holistic approach to yoga and meditation that focuses on spiritual growth, physical well-being, and personal development for the next generation.
Incorporate mindfulness practices to cultivate self-awareness and inner peace
Teach asanas (yoga postures) for physical strength, flexibility, and balance
Guide students in pranayama (breath control) techniques for energy and relaxation
Introduce meditatio...
My life is a journey of self-discovery, balancing body, mind, and soul through yoga and meditation.
I practice daily meditation to connect with my inner self, fostering peace and clarity.
Yoga helps me maintain physical health and flexibility, allowing me to feel more grounded.
I engage in mindful breathing exercises to reduce stress and enhance my overall well-being.
Teaching others about yoga and meditation brings me joy...
Whatever we know we have to discuss for each and every one to analyse the elements has different of quality of different of uses like that as I am a sky
Every person has come different places of different situation different area of different educations and different relationships so discussion of group is each and everyone to develop in self
I appeared for an interview in Dec 2024, where I was asked the following questions.
I aspire to become a leading social media strategist, creating impactful content that engages audiences and drives brand growth.
Develop expertise in social media analytics to measure campaign success.
Create compelling content that resonates with target audiences, like viral posts or engaging videos.
Stay updated on industry trends to implement innovative strategies, such as using emerging platforms.
Build a personal bran...
Earthquakes can lead to fatalities from injuries, building collapses, and lack of resources; preparedness and response are key.
Injuries from falling debris: Ensure buildings are structurally sound and conduct regular safety drills.
Building collapses: Advocate for strict building codes and retrofitting older structures.
Lack of medical resources: Establish emergency response plans and stockpile essential supplies.
Psychol...
War often leads to destruction and suffering, rarely providing lasting solutions for humanity's challenges.
War can result in significant loss of life and trauma, as seen in World War II.
Historical conflicts, like the Vietnam War, often lead to long-term societal divisions.
While some argue war can lead to political change, such as the American Revolution, the costs are immense.
Peaceful resolutions and diplomacy have pro...
Addressing real-life issues post-war requires empathy, community engagement, and effective communication strategies.
1. Foster open dialogue: Create platforms for affected individuals to share their experiences, such as community forums or social media groups.
2. Provide mental health support: Collaborate with mental health professionals to offer counseling services for trauma recovery.
3. Highlight success stories: Share...
Wars lead to numerous societal, economic, and psychological challenges that persist long after the conflict ends.
Displacement of populations: Millions may become refugees, as seen in the Syrian civil war.
Economic instability: War can devastate economies, leading to unemployment and poverty, like in post-war Iraq.
Psychological trauma: Many veterans and civilians suffer from PTSD, affecting mental health services.
Destruc...
Facing natural disasters requires preparedness, community support, and effective communication strategies to minimize impact and ensure safety.
Develop an emergency plan that includes evacuation routes and communication methods.
Create a disaster supply kit with essentials like water, food, and first aid supplies.
Engage in community drills to practice response to various disasters, such as earthquakes or floods.
Utilize s...
I applied via Campus Placement and was interviewed in May 2024. There was 1 interview round.
Write program to sort data
DSA round was there it was good
I applied via Job Portal and was interviewed in Dec 2023. There was 1 interview round.
I applied via Company Website and was interviewed in Dec 2023. There were 2 interview rounds.
All models should be made available or their complete information should be given in fresher training.
Top trending discussions
Some of the top questions asked at the Facebook interview -
The duration of Facebook interview process can vary, but typically it takes about 2-4 weeks to complete.
based on 39 interview experiences
Difficulty level
Duration
based on 170 reviews
Rating in categories
Software Engineer
89
salaries
| ₹73 L/yr - ₹120 L/yr |
Data Scientist
30
salaries
| ₹45 L/yr - ₹83.9 L/yr |
Software Developer
25
salaries
| ₹27.8 L/yr - ₹51.5 L/yr |
Senior Software Engineer
21
salaries
| ₹43.1 L/yr - ₹80.2 L/yr |
Program Manager
15
salaries
| ₹32.4 L/yr - ₹53.1 L/yr |
Amazon
Apple
eBay