Thanks for the tips. :D
Will post back if I encounter further problem...
Type: Posts; User: jch02140
Thanks for the tips. :D
Will post back if I encounter further problem...
Thanks. :)
However, when I tried your code. The result for the first example does not return 2 but 1... Also, I assume the question are referring to user inputting any arbitrary number of elements...
Hi there.
Sorry about the sample output... The second one should be this:
countClumps{(1, 1, 2, 1, 1}) ? 2
For the last one, as we have two or more 1 that is the same as the 1 at position...
I have a question like this:
Say that a "clump" in an array is a series of 2 or more adjacent elements of the same value. Return the number of clumps in the given array.
e.g
Here is my...