FB NYC 跳槽面经

I interviewed with facebook for Android Software Engineer at New York.

Phone Screen:

I was able to solve the question and went for onsite.

Onsite:

Round 1: [System Design]

  • Design an application, let’s call it “My Photo App”(MPA) which would allow you to view your pictures across all devices. (Very similar to Google Pictures)
    For example, you have 2 smartphones, both of them have MPA installed on them. You clicked some pictures on one device and then opened MPA on another device, you should be able to see pictures from both the devices.

I think I screwed up badly in this round. There were a lot of concerns to take care of, how will you sync pictures to your server, how quickly will you sync, what will happen if synching fails, etc. I explored client server architecture, how to send pictures from one device. Should I send only one picture and wait for acknowledgement or should I do combined ack. How do you access pictures? SQLite Databse. How do you send pictures? Something similar to TCP/IP (Stop and wait vs Go back N vs Selective Repeat). Android side, I explored concepts like services, compression and how to update UI using handlers.

Round 2: [Coding]

  • https://leetcode.com/problems/add-binary/
    Told my interviewer that this was the same question that I was asked during the telephonic interview. Was hoping for brownie points. Sigh.
  • Interviewer changed the question. Given some salary and tax brackets, calculate tax. - Solved it.

Round 3:

Round 4:

  • Subarray sum with k (solved)
  • Given M sorted lists, of combined size of N, find the kth smallest element.
    The lists are individually sorted but not guranteed to be sorted amongst themselves.
    For example:[1,2,3]
    [4,5,7]
    [0,6,8,9]//m lists. Combined lenght of all the lists is n
    find the kth smallest element.
    • k = 5, answer = 4
      I solved it using min heap which works but isn’t an optimal appraoch. Should have used max heap of size k. The interviewer hinted that I was not using the fact that the lists were sorted. She mentioned that the heap solution would work regardless of the fact that the lists are sorted or not. I couldn’t think of a solution that would exploit the fact that the lists were sorted

And then one week later, got the dreadful mail which read “Thank you for your time. Unfortunately…”

Feedback received - Work on your system design.

Overall, it has been a great experience! Hope this helps :slight_smile: