I assume that I can transfer the characters correctly from the browser to VS, i.e. converting from UTF8 to Unicode. `
"ẞtß".ToLower() gives hex:"DF-00-74-00-DF-00", therefore "t" is the single non-repeating char.
I make the same steps with "σtς" which gives: hex "C3-03-74-00-C2-03".
From this result I would conclude that "σ" is the first non-repeating character. What is my mistake?
VS displays your 3rd string with an obviously different character than the browser.
Your function should return the first non-repeated char of the string, so, if the string has only 1 char, it should return that one. It's not repeated, is it? At least I think that's the way of understanding it.
Check if your solution passes two successive calls with different inputs. It's sometimes the case that the solution contains some global variables or static members and a stale state is carried over from one invocation to another.
all random tests return an incorrect result, although I have checked my code in another compiler and it returns the correct answer with these values
of the "number" parameter. (python)
Santa Claus must still be waiting for this code to run
I assume that I can transfer the characters correctly from the browser to VS, i.e. converting from UTF8 to Unicode. `
Yes, Thanks !
Your function should return the first non-repeated char of the string, so, if the string has only 1 char, it should return that one. It's not repeated, is it? At least I think that's the way of understanding it.
Looks at the minimal test suite (in Python) :
test.assert_equals(first_non_repeating_letter('a'), 'a')
I may have misunderstood the point, so I've added a specific check on len(s) == 1 => return s
What are you saying there?
'a'
is not repeated, so, yes,dups('a') => ''
of course.If a string contains all repeating characters, it should return an empty string ("");
dups('a') => '' and not 'a'
From the docs: https://docs.codewars.com/training/troubleshooting#your-solution-seems-to-work-or-is-close-to-working-but-still-fails-tests
This is not true and your oslution has a bug because it uses global variables.
all random tests return an incorrect result, although I have checked my code in another compiler and it returns the correct answer with these values
of the "number" parameter. (python)
Same bro
For C# the opening and closing braces of the class should be at the line start.
Typo in the description in "The digits are sequential, incementing†: 1234" : "incementing" instead of "incrementing".
It also took me so long for such an easy solution. But I got it in the end!
Wow
Loading more items...