# Thread: Logic cyclic

1. ## Logic cyclic

Hi guys; Im asking here about the logic than the code; if I have array with size 15 for instance and have two pointers one pointer pointing on index 0 and the other pointer pointing on index 0; at every step Im increasing the first pointer by 4 jumps ; the other pointer by one jump ...lets assume that they are jumping "infinity time" (always in the pattern I have explained) .. Will they meet each other on specific element in the array in any time?

My sol: yeah they could meet but they might also not meet ..if there's a constant difference jumps between them

Thanks alot!!

2. The earliest would be a single jump for the one jumping one jump at a time and four jumps on the other.
Since, this is likely a homework question I will not tell you how.

Note: I am considering a jump to be a single increment of the pointer.

Tim S.

3. Originally Posted by stahta01
The earliest would be a single jump for the one jumping one jump at a time and four jumps on the other.
Since, this is likely a homework question I will not tell you how.

Note: I am considering a jump to be a single increment of the pointer.

Tim S.
didn't understand you explanation, may you illustrate more? thanks alot!

4. Originally Posted by stahta01
The earliest would be a single jump for the one jumping one jump at a time and four jumps on the other.
Since, this is likely a homework question I will not tell you how.

Note: I am considering a jump to be a single increment of the pointer.

Tim S.
You might want to look at RyanC's previous posts

5. I answer his post when it is a valid newbie post instead of just a help vampire spiel.

His reply is a help vampire reply.

Tim S.

6. Well if nothing else, RyanC is famous for going round in circles, never knowing where he's been, or where he's going.

Popular pages Recent additions