in reply to chapters,sentences, and arrays
In essence, you are trying to determine a hidden property of a number (which chapter a sentence is in) by looking at some other property of the number (its ordinal value in all sentences). Are you looking for a way to create a function that given any sentence in the book, determine which chapter it is in by some creative math approach? If so, please respond. If not, probably the most efficient way is to map all sentences to a chapter in the book using a hash (assumes book is static, numerous lookups, and that memory consumption is not prohibitive).
Cheers - L~R
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: chapters,sentences, and arrays
by JadeNB (Chaplain) on Oct 21, 2008 at 19:36 UTC | |
by Limbic~Region (Chancellor) on Oct 22, 2008 at 14:46 UTC | |
by ikegami (Patriarch) on Oct 22, 2008 at 18:22 UTC | |
by Perlbotics (Archbishop) on Oct 23, 2008 at 19:40 UTC |