Timeline for Write a compact spelling checker
Current License: CC BY-SA 3.0
13 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Nov 21, 2015 at 15:42 | comment | added | user45941 | You should go ahead and drop the 1113 bytes by getting rid of the base64 encoding, and add a hexdump for copy-and-pasteability. | |
| Jun 5, 2015 at 11:05 | comment | added | Nejc |
@squeamishossifrage yes I noticed... I went for your suggestion about t={} I just didn't add a break, because t={}. It just scans the whole word until the end, even though at that point we know it won't get accepted.
|
|
| Jun 5, 2015 at 11:03 | history | edited | Nejc | CC BY-SA 3.0 |
Shaved off another 11 chars due to suggestions and smaller list of words
|
| Jun 5, 2015 at 10:58 | comment | added | r3mainer |
No, print False won't do it — "armpit" results in False False False True
|
|
| Jun 5, 2015 at 10:56 | history | edited | Nejc | CC BY-SA 3.0 |
shaved off 13 chars by printing the result
|
| Jun 5, 2015 at 10:55 | comment | added | CJ Dennis | The list is also 11 bytes shorter now so you might want to recompress. | |
| Jun 5, 2015 at 10:53 | comment | added | r3mainer |
@Nejc I deleted my comment after noticing the same thing. However, I think else:t={};break and print""in t might work. The final newline is also unnecessary
|
|
| Jun 5, 2015 at 10:51 | comment | added | Nejc |
@squeamishossifrage the else:break would not work... If you would query with word coloura, which obviously is not a word, the program would return 0. That is because in the last step, the trie would be {"":0}. It would not find "a", but it would find "" and return 0.
|
|
| Jun 5, 2015 at 10:43 | comment | added | CJ Dennis | Are you trying to edit your answer more times than I edited the question? | |
| Jun 5, 2015 at 10:42 | history | edited | Nejc | CC BY-SA 3.0 |
set the compression to 9 and saved 200 chars
|
| Jun 5, 2015 at 10:42 | comment | added | Nejc | LOL no :) ... it's a typo | |
| Jun 5, 2015 at 10:41 | history | edited | Nejc | CC BY-SA 3.0 |
set the compression to 9 and saved 200 chars
|
| Jun 5, 2015 at 10:21 | history | answered | Nejc | CC BY-SA 3.0 |