Tests don't verify cases when letters are reshuffled. E.g. "word" and "crow" have only one replaced letter (d vs c) but other letters are reshuffled so answer should be False. I wrote more blunt solution that doesn't check letter positions and it still passes.
errrr... since when the element at "index 0" of a linked list is the last element of it...? :o
Aren't there any convention about this? I always remember the head as being equivalent to index 0 (cannot find quickly something meaningful on google, right now)
C# Translation ready for review.
Tests don't verify cases when letters are reshuffled. E.g.
"word"
and"crow"
have only one replaced letter (d
vsc
) but other letters are reshuffled so answer should beFalse
. I wrote more blunt solution that doesn't check letter positions and it still passes.errrr... since when the element at "index 0" of a linked list is the last element of it...? :o
Aren't there any convention about this? I always remember the head as being equivalent to index 0 (cannot find quickly something meaningful on google, right now)