Reading Zaphod_b solution gave me an idea.
Make an infinite loop because you cannot know the number of times it will be an invalid vote.
Have an index which you will increment each time there is a...
Type: Posts; User: alexdan
Reading Zaphod_b solution gave me an idea.
Make an infinite loop because you cannot know the number of times it will be an invalid vote.
Have an index which you will increment each time there is a...
Hi!
I think the problem lies in statement:
return cherryCnt++;
.
cherryCnt never gets incremented. It will always be 0. If you want to increment it, you must say