Facebook Telephonic Interview - Software Engineer Intern

Interview 1: Sat idle for 1 hour. The interviewer did not join the meeting.
(HR responded after the 2nd interview. Because the first interviewer didn't show up, they re-scheduled it to Friday).

Interview 2:
5 mins of discussion about the interviewer's work followed by 5 minutes of discussion about my projects.
2 mins of discussion about the problem regarding Interview 1.

Q.1. https://leetcode.com/problems/squares-of-a-sorted-array/

I wrote the below code. Interviewer seemed happy with my below solution.

class Solution {
public int[] sortedSquares(int[] A) {

   int i = 0;
   int  j = A.length -1;
   int ans[] = new int[A.length];
   int k = A.length; 
    
  while(i<=j)
  {
      int prol = A[i] * A[i];
      int pror = A[j] * A[j];
      
      if(prol > pror)
      {    ans[--k] = prol;
           i++;
      }
      else
      {   
          ans[--k] = pror;
          j--;
       }              
  }      
    return ans;
}

}

Q.2. Wordbreak problem : https://leetcode.com/problems/word-break/
I could not finish the full implementation but explained the logic using the Top Down - Dynamic Programming Approach with Memoization.
(I wish I could have completed it. But the interviewer seemed neutral, and 5 minutes before time-up asked me to ask any questions if I have and informed me about re-scheduling Interview 1.)

Any advice for me regarding how to prepare in 3 days with other work?

Comments (2)