View algorithms on Arrays

Let us try to understand this problem statement first. It is actually very verbose. We will try to simplify it as much as possible. Christy wants to give chocolates to her colleagues, and at the same time tries to ensure that everyone has equal chocolates at the end. To achieve this she either gives 1,2, or 5 chocolates to everyone except any one individual. Every-time she does this, it is counted as 1 operation. We need to make sure that Christy can achieve this task in the minimum number of…