Search:

Type: Posts; User: jch02140

Search: Search took 0.20 seconds.

  1. Replies
    6
    Views
    2,498

    Re: Help with output

    Thanks for the tips. :D

    Will post back if I encounter further problem...
  2. Replies
    6
    Views
    2,498

    Re: Help with output

    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...
  3. Replies
    6
    Views
    2,498

    Re: Help with output

    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...
  4. Replies
    6
    Views
    2,498

    Help with output

    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...
Results 1 to 4 of 4