Facebook | Phone | Add Strings & Dot Product of Sparse Vectors

Location: Seattle
Mode: Video Conference
Android Questions:

  1. Differentiate onPause() and onStop() method, what will call when? onPause() - When partialy hide the screen, onStop()- When activity put into the stack (Complete hide)
  2. At what thread Android service (extend by Service class) run by default? Main Thread
  3. What are the different way to communicate main thread from service? LocalBroadcasting, Handler

Coding:

My bad, I wasn't aware of dot products and I asked interviewer to give me the sample input and output. But, seems like he wasn't prepare for that. I got screwed up by understanding the problem till the end. I'm able to find the right way to store the value, but I'm not able to provide the correct soltuion due to unavailability of sample output.

But, I've asked to give the interview again. Looks like one more chance :-)

Comments (5)