Beta

Just Another String Comparer

Description
Loading description...
Algorithms
Strings
  • Please sign in or sign up to leave a comment.
  • ah2023 Avatar

    I don't understand why the correct answer is “true” in the test case "normalString3"

    IEnumerable<string> columns = new string[] { "1:Good Morning.", "Good Morning." };
    Assert.AreEqual(true, instance.testCompare(columns, 7));
    
  • Voile Avatar

    Re-raising the issue below:

    Why using IEnumerable<string> when you always pass a length 2 array?

    Notably, this implementation goes against C# conventions (specifically the IComparer interface) and hence is completely useless for any actual use.

  • ZED.CWT Avatar

    Why using IEnumerable<string> when you always pass a length 2 array? Why not just instance.testCompare(a,b,2)

  • ZED.CWT Avatar

    everything with only digits and at most one of the signs '-' and '.' each.

    Are .000, 000., -000., -.000, -, -. or . numbers?

    • Kaiyou Avatar

      Having a digit is a requirement for a number. "[...] digits and [...]" As far as this Kata goes none of your suggestions count as numbers.

      Defining what is and what is not a number can get rather tricky. Please try to use the common sense a grade schooler would use to evaluate this question.

      Question marked resolved by Kaiyou 6 years ago
    • Voile Avatar

      Please try to use the common sense a grade schooler would use to evaluate this question.

      I believe a grade schooler will instead yell at the teacher "what the fuck are you doing" if the teacher decides to do this.

      This is an insult to what a teacher and student is. Teacher is supposed to do their job explaining things in a way that students can actually understand. Please don't abuse your students and claim you have the authority to do so.