30 years of experience as a software engineer across multiple industries including computer vision, medical, logistics, automotive, and financial technology.
(wordle, Continued) 2/2
Is your word an actual word? just encode it as well, and see if it's in the array. To make it fast, sort the array first. (Either do a binary search or probably a hash, hash table?).
Wordle thoughts...
How to implement...
Dictionary of words:
To save space, each letter (max 26, <32,=2^5), could be encoded into 5 bits. That times 5, is 25 bits (<32=4*8=4 bytes=an int).
So all the words would just be an of number.
@jeffblankenburg@timwingfield Is your word an actual word? just encode it as well, and see if it's in the array. To make it fast, sort the array first. (Either do a binary search or probably a hash table?).
@jeffblankenburg@timwingfield To save space, each letter (max 26, <32,=2^5), could be encoded into 5 bits. That times 5, is 25 bits (<32=4*8=4 bytes=an int).
So all the words would just be an of number.
@g33klady So which one is worse? Corona - causes an inconvenience, hassle for a while. Small chance of death.
JavaScript- a reoccurring pain that lasts ones entire career. Chance of infection, very high. Js framework mutation rate, very high. No known cure