|
-
November 9th, 2010, 12:50 PM
#5
Re: C++ Advice for an 'Old Git'.
 Originally Posted by Lindley
I only specified separate counters because that seemed to be what you were indicating with the "points" system. I'm not quite sure what's going on there, so perhaps I've misunderstood.
Looks like he's got some kind of weighted counter thing going on. He gets a total of the 1s, 2s, and 3s, and compares that total to the length of the string and assigns is some kind of value. The higher the occurrences to length ratio, the higher the value.
So, converting the number to a string, iterating the string and adding to the counter when you get a 1, 2 or 3 seems to be the way to go.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|