Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Kata solutions teach me more than any reading I have ever come across
Well it is not super unrealistic as this code could be run under the Win16 API on a 32-bit Windows system (or an old DOS machine), which only has 16-bit
int
s.This comment is hidden because it contains spoiler information about the solution
Needs a fork to be approvable.
This comment is hidden because it contains spoiler information about the solution
Will not work if the number of identical characters causes an int overflow, +1
Не будет работать, если количество одинаковых символов вызовет переполнение int, +1
wow
Well, he used letters as indexes in his array (since computers sees only numbers: A is 65 in ASCII).
Before that he covers up all possiblly encoded symbols in range of 256 bits (thus, table[0..255])
=> similar to count sort algorithm
i.e. the following string "ABA" will have these values in the table[] after the first loop (counting loop):
1st round: table[65] = 1
2nd round: table[66] = 1
3rd round: table[65] = 2 => which will be checked within the verifying second loop by <if (table[toupper(word[i])] == 1)>
Funny why I never think of this. Nice One!
yeah me too
Interesting solution!
What does condition if (table[toupper(word[i])] == 1) mean? I can't understand how this works and checks how many letters in string repeat.
It also has bugs in Kotlin.
dotest has bug. it does not free act on C.
I couldn't understand what it was asking for.