|
|
9154fe5b3f
|
added empty value for trie (which is different from an empty type constructor), and check against empty at the start of insert and search/exists function
|
2024-09-05 03:06:00 +01:00 |
|
|
|
7cfa393e05
|
tested getPrefixList, fixed errors, and now it seems to work fine
|
2024-09-04 19:30:29 +01:00 |
|
|
|
dd41c971e3
|
seem to have fixed error with 'exists' function previously mentioned in todo, without introducing regressions
|
2024-09-04 18:57:39 +01:00 |
|
|
|
b2b0837524
|
just formatting, and removing part of the todo list
|
2024-09-04 16:39:13 +01:00 |
|
|
|
20de15b349
|
fixed 'helpExists' function; error was in the FOUND case which checked 'keyPos = String.size searchKey' instead of 'keyPos = String.size searchKey - 1'. The latter is correct, because it checks that the keyPos ended at the last character, which is the intended meaning
|
2024-09-04 16:38:27 +01:00 |
|
|
|
86f171cd08
|
try implementing getPrefixList function, but it seems insert function has an error, so made a note of it to fix this error in a comment; fixing this error is the first priority
|
2024-09-04 15:26:21 +01:00 |
|
|
|
ccd0ee42d5
|
add function to retrieve prefix subtrie (but will still want a function that returns a list of prefixes, and a vector of prefixes
|
2024-09-04 14:56:20 +01:00 |
|
|
|
65eff83c0b
|
fix error with 'helpExists' function; the error was that we recursed in 'helpExists' function by calling keyPos + 1 (nextKeyPos) which is the wrong way to search when the trie key has a string size larger than 1
|
2024-09-04 13:32:45 +01:00 |
|
|
|
6696480a39
|
amend a couple of errors (wrong sorting for some strings), and add todo for bug discovered
|
2024-09-04 13:14:54 +01:00 |
|
|
|
ec7ff7ede6
|
some refactoring (and progress filling in the FOUND_WITH_CHILDREN case in the 'helpInsert' function)
|
2024-09-04 12:17:06 +01:00 |
|
|
|
0d25b88caa
|
change 'helpInsert' function to return trie instead of trie option (I would guess there are fewer cases where the same string is inserted into the trie repeatedly)
|
2024-09-04 12:05:43 +01:00 |
|
|
|
90019de17f
|
amend bug in 'insertBinSearch' function which caused subscriptt error, thereby addressing one of the todo items
|
2024-09-04 11:53:00 +01:00 |
|
|
|
7a4a99a408
|
add 'fromList' convenience function
|
2024-09-04 08:16:56 +01:00 |
|
|
|
38b534d935
|
discover error, make note of it, and update todo comment
|
2024-09-04 08:11:43 +01:00 |
|
|
|
fa3245b47c
|
progress coding insert function
|
2024-09-04 07:54:35 +01:00 |
|
|
|
88ec026921
|
progress with coding insert function
|
2024-09-03 22:09:31 +01:00 |
|
|
|
f518ebb4b3
|
progress with insert function, adding note for next todo
|
2024-09-03 20:16:39 +01:00 |
|
|
|
2f14c99952
|
init with working 'exists' function for string set
|
2024-09-03 10:15:55 +01:00 |
|