• Sign Up
  • Kata
  • Kumite
  • Forum
  • Wiki
  • Leaders
  • Log In
  • Sign Up
Name:Chris Salch
Clan:f(x) = x
Skills:php, perl, javascript, c
Member Since:Nov 2012
Last Seen:Sep 2018
Profiles:
Following:0
Followers:2
Allies:0
View Profile Badges
  • Stats
  • Kata
  • Collections
  • Kumite
  • Social
  • Discourse
  • Conversations (99)
  • Replies
  • Authored
  • Needs Resolution
    • idan315
    • commented on "Interleaving Arrays" kata

    upon further exploration, it's because I change the argument arrays, and this makes the unit test expected calculation misbehave. Either the unit tests should be fixed (to at least display a meaningful error in that case...), or the instructions clarified.

    • idan315
    • created an issue for "Interleaving Arrays" kata

    Is there some issue with the random tests in ruby? I keep getting failures because it expects an empty array when I return an interleaved array. For example, in one of the random tests, the input was:
    3 <<<<
    t k 1 0 c l y <<<<
    q x 5 <<<<
    l 8 o s g a v <<<<
    m v <<<<
    j k s v r <<<<
    b 4 s r f f 3 r <<<<
    4 z 0 6 <<<<
    <<<<
    (each row is an array)
    and I got the error message:
    Expected: [], instead got: [3, "t", "q", "l", "m", "j", "b", 4, nil, nil, "k", "x", 8, "v", "k", 4, "z", nil, nil, 1, 5, "o", nil, "s", "s", 0, nil, nil, 0, nil, "s", nil, "v", "r", 6, nil, nil, "c", nil, "g", nil, "r", "f", nil, nil, nil, "l", nil, "a", nil, nil, "f", nil, nil, nil, "y", nil, "v", nil, nil, 3, nil, nil, nil, nil, nil, nil, nil, nil, "r", nil, nil]

    • fibonaccios
    • commented on "Interleaving Arrays" kata

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

    • fibonaccios
    • commented on "Interleaving Arrays" kata

    Why not?

    • maxchiodo
    • commented on "Interleaving Arrays" kata

    Is this really a 5?

    • suic
    • resolved an issue on "Interleaving Arrays" kata

    Thanks for reporting. It's fixed. Regards, suic

    • XHawk87
    • created an issue for "Interleaving Arrays" kata

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

    • steffan153
    • resolved a suggestion on "Interleaving Arrays" kata
    • suic
    • created a suggestion for "Interleaving Arrays" kata

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

    • steffan153
    • resolved a suggestion on "Interleaving Arrays" kata
    • Glyxerine
    • created a suggestion for "Interleaving Arrays" kata

    Ruby translation

    • alexanderywang
    • commented on "Interleaving Arrays" kata

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

    • caducus
    • commented on "Interleaving Arrays" kata

    Thanks a bunch! Being able to see the issue made it possible to actually resolve the problem.

    • FArekkusu
    • resolved an issue on "Interleaving Arrays" kata

    Updated the tests to use chai.

    • Chrono79
    • created an issue for "Interleaving Arrays" kata

    Change testing suite to use chai so the error message in Node 10 is meaningful

    const chai = require("chai");
    const assert = chai.assert;
    chai.config.truncateThreshold = 0;
    
    describe("Sample tests", function() {
      it("Tests", function() {
        assert.deepEqual(interleave([1, 2, 3], ["c", "d", "e"]), [1, "c", 2, "d", 3, "e"]);
        ...
    

    Specially in random tests where arrays are bigger.

  • Loading more items...
  • © 2021 Codewars
  • About
  • API
  • Blog
  • Privacy
  • Terms
  • Contact
  • powered by

Confirm

  • Cancel
  • Confirm