amend bug in 'insertBinSearch' function which caused subscriptt error, thereby addressing one of the todo items
This commit is contained in:
BIN
src/string-set
Executable file
BIN
src/string-set
Executable file
Binary file not shown.
@@ -200,7 +200,7 @@ struct
|
|||||||
helpInsertBinSearch (findChr, keyPos, children, low, mid - 1)
|
helpInsertBinSearch (findChr, keyPos, children, low, mid - 1)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
linearSearch (findChr, keyPos, mid, children)
|
linearSearch (findChr, keyPos, if mid >= 0 then mid else 0, children)
|
||||||
end
|
end
|
||||||
|
|
||||||
fun insertBinSearch (findChr, keyPos, children) =
|
fun insertBinSearch (findChr, keyPos, children) =
|
||||||
@@ -237,7 +237,6 @@ struct
|
|||||||
|
|
||||||
(*
|
(*
|
||||||
* todo:
|
* todo:
|
||||||
* - Debug the Subscript error raised when calling helpInsert
|
|
||||||
* - Complete code for FOUND_WITH_CHILDREN case in insert function.
|
* - Complete code for FOUND_WITH_CHILDREN case in insert function.
|
||||||
*)
|
*)
|
||||||
|
|
||||||
@@ -426,5 +425,5 @@ struct
|
|||||||
end
|
end
|
||||||
| fromList ([]) = raise Empty
|
| fromList ([]) = raise Empty
|
||||||
|
|
||||||
val trie = fromList ["hello"]
|
val trie = fromList ["hello", "bye", "try", "why"]
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user