Results 1 to 2 of 2

Thread: Ordering Integers, Small -> Big + knowing length of streak

Threaded View

  1. #1

    Thread Starter
    New Member MuscleShark88's Avatar
    Join Date
    Feb 2010
    Posts
    12

    Ordering Integers, Small -> Big + knowing length of streak

    Hi everyone, first time posting here.

    I was wondering if someone could help me out w/ this little problem I'm having.

    card1
    card2
    card3
    card4
    card5
    card6
    card7

    are my integers and they range from 2 to 14 (yes, we're dealing w/ cards 2 -> Ace)

    what I would like to do is order them from smallest to largest and find out what the longest streak is.

    for example:

    With the 7 cards being: 2, 2, 3, 4, 7, 9, 13

    2, 3, 4 would be the longest streak, so the answer would be 3. I also need to know where the streak starts and where it ends. In this example, 2 is the start, 4 is the end.

    Thanks alot for your help!
    Last edited by MuscleShark88; Feb 9th, 2010 at 01:15 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width