Generic algorithm question
-
Hello, I need to find out a solution for below problem, can anyone please let me know what is the best algorithm for this problem, I have to distribute sweets among 3 persons let A,B, C with no 5,3,2 respectively so total 10 sweets I have to distribute among these 3 without repeating again(if A has given then next time B or C but A should not come again). so the sequence can be like as below, Sol1: C,B,C,B,C,A,C,A,C,B Sol2: B,C,A,C,B,C,B,C,A,C Please let me know if any algorithm I can use for this problem Thanks
asdsa
-
Hello, I need to find out a solution for below problem, can anyone please let me know what is the best algorithm for this problem, I have to distribute sweets among 3 persons let A,B, C with no 5,3,2 respectively so total 10 sweets I have to distribute among these 3 without repeating again(if A has given then next time B or C but A should not come again). so the sequence can be like as below, Sol1: C,B,C,B,C,A,C,A,C,B Sol2: B,C,A,C,B,C,B,C,A,C Please let me know if any algorithm I can use for this problem Thanks
asdsa
Ashish Ranjan Mishra wrote:
I have to distribute sweets among 3 persons let A,B, C with no 5,3,2 respectively so total 10 sweets...
:confused:
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles