Ad
  • Custom User Avatar

    In the Opera browser, I had to switch to bright mode using the switch at the top right corner of the CW window. In dark mode, the dark text was really hard to read.

  • Custom User Avatar

    I would prefer a project configuration in CW in which Check for arithmetic overflow is activated. I would rather not know how often an undetected integer overflow occurs in the random tests for both the user code and the sensei code and the solution is considered valid.

  • Custom User Avatar

    the solution is displayed as best pratices but DRY (LCM(x, y) is calculated twice)

  • Custom User Avatar

    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.
    
    
    
    
  • Custom User Avatar

    I would like to know why there are so few solutions with Linq (estimated less than 10% of the solutions are done with Linq), although a Linq solution can usually be understood much faster than an interative solution

  • Custom User Avatar

    Thank you very much. I have found a nice Linq solution with SingleOrDefault()

  • Custom User Avatar

    (csharp)I can't find out why the result for this input:

    copies=*v*l****, ***l]*W*, +vg*]WWN, +*g****N, *WYhDw*d, 8WYhD*Y*, *WY*Dw*d, 8WYhD*Yd, 8WYh*wYd
    

    should be:

    +vgl]WWN
    

    notice: some strings start with '+' und some strings start with '8' and some with '*'

    Can someone help me please?

  • Custom User Avatar

    (C#) In VS the random tests use \n but the tests defined by verbatim strings (i.e. @"...") use \r\n AFTER copying to VS.The codewars environment uses \n in both cases. Your solution should replace as first operation \r\n by \n:

    snapshot.Replace("\r\n","\n")
    In this case you cannot write: snapshot.Split(Environment.NewLine)
    
  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    The windows ansi (e.g) encoding for "¤" is 164 but the UTF8-Encoding for "¤" is: {194, 164} or in Trinary {"21012", "20002"}. The question mark means there is no valid UTF8 encoding given.
    As you can see in https://en.wikipedia.org/wiki/UTF-8 under the heading "Code point UTF-8 conversion" there are 2 bytes required for the character "¤" resp. &currenc resp. Ansi1252 = 164
    The assert should be

     Assert.That(source.FromTrinary("010210 010220 010221 010202 010222 010211 010221 010222 010222 010222 021012 020002 001101 001022 001020"), Is.EqualTo("fijekgjkkk¤%#!"));
    

    Please note the inserted 021012.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    I suggest adding test cases where the date of birth is exactly n years before the current date and is in a leap year

  • Custom User Avatar

    What a wonderful kata. After you solved it you will like it.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Loading more items...