Facebook interview experience Real time questions & tips from candidates to crack your interview

Business Technology Analyst

Facebook
upvote
share-icon
1 rounds | 2 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 5 months
Topics: Arrays, Basic Implementation, Maths, Strings, Stacks, Queues, Tress, BST, Graphs, Dynamic Programming
Tip
Tip

Tip 1 : Make your resume and LinkedIn profile strong.
Tip 2 : Prepare for both Data Structures (topic-wise and company-wise) and competitive programming.
Tip 3 : Apply through referral and read some past interview experience

Application process
Where: Company Website
Eligibility: No criteria
Resume Tip
Resume tip

Tip 1:Include relevant past experience.
Tip 2:Achivements section.

Interview rounds

01
Round
Easy
Face to Face
Duration45 minutes
Interview date20 May 2022
Coding problem2

1. Delete Kth node From End

Moderate
15m average time
95% success
0/80
Asked in companies
OracleMyntraGartner

You have been given a singly Linked List of 'N' nodes with integer data and an integer 'K'.


Your task is to remove the 'K'th node from the end of the given Linked List and return the head of the modified linked list.


Example:
Input : 1 -> 2 -> 3 -> 4 -> 'NULL'  and  'K' = 2
Output: 1 -> 2 -> 4 -> 'NULL'
Explanation:
After removing the second node from the end, the linked list become 1 -> 2 -> 4 -> 'NULL'.

altImage


Problem approach

Step 1: The idea to approach this problem is to find the size of the whole linked list and then delete the N-K+1 node from the start. Take two-pointers and delete the required node.
Step 2: Then I optimized the solution by reducing the pointers to one.
Step 3: Further optimized the solution by reducing the extra traversal for finding the size of the linked list. We can maintain two pointers and increase the first pointer up to K and then increase both first and second pointer till first reaches to end.
Now delete the second pointer as it will be at the Kth position from the last.

Try solving now

2. Rotting Oranges

Moderate
20m average time
78% success
0/80
Asked in companies
MicrosoftAmazonApple

You have been given a grid containing some oranges. Each cell of this grid has one of the three integers values:

  • Value 0 - representing an empty cell.
  • Value 1 - representing a fresh orange.
  • Value 2 - representing a rotten orange.
  • Every second, any fresh orange that is adjacent(4-directionally) to a rotten orange becomes rotten.

    Your task is to find out the minimum time after which no cell has a fresh orange. If it's impossible to rot all the fresh oranges then print -1.

    Note:
    1. The grid has 0-based indexing.
    2. A rotten orange can affect the adjacent oranges 4 directionally i.e. Up, Down, Left, Right.
    
    Try solving now

    Here's your problem of the day

    Solving this problem will increase your chance to get selected in this company

    Skill covered: Programming

    Which SQL keyword removes duplicate records from a result set?

    Choose another skill to practice
    Similar interview experiences
    company logo
    SWE Intern
    2 rounds | 5 problems
    Interviewed by Facebook
    1133 views
    0 comments
    0 upvotes
    company logo
    SDE - Intern
    2 rounds | 4 problems
    Interviewed by Facebook
    934 views
    0 comments
    0 upvotes
    company logo
    SDE - Intern
    2 rounds | 3 problems
    Interviewed by Facebook
    1409 views
    0 comments
    0 upvotes
    company logo
    SDE - 1
    5 rounds | 10 problems
    Interviewed by Facebook
    729 views
    0 comments
    0 upvotes