1.3 - Warm-up Problem (Separate HEAVY and LIGHT coins)

Описание к видео 1.3 - Warm-up Problem (Separate HEAVY and LIGHT coins)

You are given "n" coins, where coins are of two types - HEAVY and LIGHT. All HEAVY coins are of the same weight, and all LIGHT coins are of the same weight, but heavy coins are heavier than the light coins. Your task is to separate these coins into two groups - i.e., a group of all LIGHT coins and a group of all HEAVY coins. All coins look the same and the only instrument you have is a traditional weighing balance, which tells if the weight on both sides is equal or not (plus which side is heavier/lighter). Also, each time you use this weighing balance, you will be charged an amount of $1. Obviously, we want to accomplish the task in the least possible amount.

Комментарии

Информация по комментариям в разработке