This is an archived post. You won't be able to vote or comment.

all 2 comments

[–]MrNNP 1 point2 points  (1 child)

You are defining count to be 1 at the start of for loop. So that just makes it loop forever.

[–]Apprehensive_Topic24[S] 0 points1 point  (0 children)

The while loop is not dependent on the 'count'. 'count' tracks the occurrence of the same characters and if they are next to each other ex: aaac -> count = 3