Google | Screening

I had google phone screen recently
Question they asked was:-

  1. Find first non repeating charater from the given string
  2. Given image with possible pixels color as Black & white efficiently store this image with the less space

2nd question had class with following methods:

  1. store pixels (x, y)
  2. get pixel color
  3. set pixel color

I could do it via 2D array as row and column were given, interviewer suggested as there are only 2 colors store them as T/F to save space, also he recommended to use BitMap (or I might be missing but something in java to store image pixels into bits)

I have followup screening now

Comments (0)