All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers
String Theory...not quite (Posted on 2010-07-27) Difficulty: 3 of 5
If the numbers 1 - 100 are written in one long string, how many substrings of minimum length 2 can be found with strictly decreasing numbers? e.g. 12345678910 has three such substrings: 91, 910, 10.

No Solution Yet Submitted by Andre    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
re: solution - agreed | Comment 4 of 6 |
(In reply to solution by Dej Mar)

I originally found one fewer (i.e. 90) but I found a typo in the 192 byte string (123...99100) I had typed into my program; making that correction I now find 91, as Dej reports.  The program looped from left to right, checking each 2-byte, 3-byte, and 4-byte string from each start position.

 

EDIT

I notice Charlie posted while I was entering my comment above. My agreement was with Dej' 91. I'll have to take a closer look at Charlie's entry.  (ed)

Edited on July 27, 2010, 3:04 pm

Edited on July 27, 2010, 3:05 pm
  Posted by ed bottemiller on 2010-07-27 14:57:29

Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (4)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2017 by Animus Pactum Consulting. All rights reserved. Privacy Information