Skip to content

Latest commit

 

History

History
9 lines (5 loc) · 533 Bytes

Facebook.md

File metadata and controls

9 lines (5 loc) · 533 Bytes

Facebook

  • Given the mapping a = 1, b = 2, ... z = 26, and an encoded message, count the number of ways it can be decoded. For example, the message '111' would give 3, since it could be decoded as 'aaa', 'ka', and 'ak'.

  • Given three 32-bit integers x, y, and b, return x if b is 1 and y if b is 0, using only mathematical or bit operations. You can assume b can only be 1 or 0.

  • Given a list of numbers, where every number shows up twice except for one number, find that one number. Find a way to do this using O(1) memory.