Suppose you have a hotel which has one floor with infinite number of rooms in a row and all of them are occupied.
- A new customer wants to check in, how will you accommodate her?
- What if infinite number of people want to check in, how will you accommodate them?
- Suppose an infinite number of buses arrive at the hotel, each having an infinite number of people, how will you accommodate them?
My approach: part 1 is cool since you can ask the kth person to move to the k+1th room.
Part 2 is where I am confused. I feel that we should just allow people to move to the next room as the customers come in one by one, probably infinitely, but the answer says to ask kth person to move to room 2k, which is weird for me.
Part 3, I know NxN has a mapping to N but what is it, and how should I exactly approach this?