algo: fix maxAlphabetSize being larger than 26 becoming a segfault
There is currently a bug that causes a segfault if maxAlphabetSize is larger than 26 (english alphabet).
For example, following command in repl will cause a segfault tree::generate::RandomRankedTreeFactory 4 5 27 1 10
, but tree::generate::RandomRankedTreeFactory 4 5 26 1 10
will execute fine.
Fixed to throw common exception if the size is exceeded.