Ad
  • Custom User Avatar

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

  • Custom User Avatar

    Because Linq is functional magic. And it does not allow you to feel the solution to the problem for real.

  • Custom User Avatar

    Linq is not the answer to everything, that's correct. But it is the right tool for this task.
    Why writing a lot of complicated and hard-readable code, when a simple and easy-to-read Linq-Query does exactly, what you want?
    For the readability; write only one Linq-command per line and it's super readable.

  • Custom User Avatar

    This is a only math solution!!!

  • Custom User Avatar

    Linq is not always the answer to everything... Although from most of the top ranked answers I have seen on this site for C# so far it seems to be! It seems all the "highest Best practices" have a magic linq one liner. Hardly readable in some cases.

  • Custom User Avatar
    • Update the code to use "bool" instead of "Boolean"
    • Remove the Console.WriteLine() in one of the final test cases.