7 kyu

The 'spiraling' box

823 of 1,952brodiemark
Description
Loading description...
Arrays
Fundamentals
  • Please sign in or sign up to leave a comment.
  • KayleighWasTaken Avatar

    Scala assertion messages are unreadable.

    Please provide formatted assertions for kata like this, especially white ones.

  • Valerio96 Avatar

    Another time the code don't work here but in VSCode is perfectly fine. I'm stocked at the beginning trying to create a numpy array of (n,m) shape but it gives me error and i don't understand how to fix it.

    Here's the code:

    def create_box(m, n): arr = np.ones((n, m)) return arr

    Here's the error: ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

    Can someone give me some advice on how to bypass that problem? Thanks in advence.

  • tobeannouncd Avatar
  • JohanWiltink Avatar

    ( JS )

    Tests should have chai.config.truncateThreshold = 0

  • Amirvee Avatar

    guys, please give me a hint on how to approach the problem.

  • eb110 Avatar

    The kata is underrated - strong 6kyu.

  • akar-0 Avatar
  • hobovsky Avatar

    I find the naming of arguments in C# utterly confusing. The name length does not seem, at least to me, to be a good complement of width. The "length" and "width" seem to overlap in meaning, and I am not sure if "length" applies to rectangular matrices at all. I would suggest renaming length to width. With current setup, it's difficult to tell what argument relates to what dimension of the output matrix.

  • GareBearino Avatar

    I got to the point where all tests I run on the IDE work as intended, but it still comes up false here (C#) This has been my favourite challenge so far though.

  • Михaил Avatar

    Чё то сложновато для 7kyu;

  • LukeGarrigan Avatar

    Probably the toughest 7Kyu I've done, was stuck with an off-by-one error! Enjoyed it, thanks.

  • ejini战神 Avatar

    This comment has been hidden.

  • Gillyrs Avatar

    This comment has been hidden.

  • dfhwze Avatar

    C#:

    • Use overload of Assert that takes a message, and use it to display the width and length input arguments.
    • Move the verification method as a local method inside the random tests for better encapsulation of that method.
  • trashy_incel Avatar
  • trashy_incel Avatar

    you have very long lines in the tests suite. when the lines are longer than some threshold, syntax highlighting is disabled for the whole program, which makes translating/maintaining/reviewing harder. I suggest you re-indent the offending lines, to activate highlighting

  • JiPiBi Avatar

    Hi, not really a spiral ?

  • that_guy_guy Avatar

    The switching of the traditional row, col ordering caused a real headache. Might wanna do a flipperoo.

  • Captain Quack Avatar

    Assertions need to use the updated test framework.

  • Voile Avatar

    Random tests should be generated on the fly, not chosen from a small set of inputs.

    (Also, 3 random tests are far from enough. Usually around 100 is advised)

  • Voile Avatar