Ad
  • Default User Avatar

    In the Instructions: “5. The longest kill streak is worth 2^N, where N is the number of kills of the streak”, so I’ve began with the idea, that only one player, with the longest kill streak, gets points, and the others get 0. And surely enough it doesn’t work. So, I got, every player becomes points for their streak nevertheless is it the best/longest result among all the players or not.
    Maybe it’s better to determine “5. The kill streak is worth …”
    And one more thing, in the Instructions: “Players with the same score should be sorted by the order they appear in the array.” So, at first, I’ve sorted the results with key = (score, position) in case there are more than one player with the same score. But then I tried and found out, that the sorting with key = score can pass all the test as well.
    So maybe it’s better to dismiss this part of Instructions, or to add additional tests, where two players or more have the same result.
    Thank you.

  • Custom User Avatar

    Floating point comparison should be enforced in all languages

  • Default User Avatar
  • Custom User Avatar

    Nice little kata but the title has no meaningful relation to the description, suggest renaming the kata to "text scrolling machine". Flagging as suggestion though in my book it's an issue :)

  • Custom User Avatar

    Actual and expected are swapped in PHP

  • Custom User Avatar

    Description should be language-agnostic (this part too --> Create a function named rotate() )

  • Custom User Avatar

    This kata is a subject to deduplication process here: https://github.com/codewars/content-issues/issues/150.
    Please join the discussion to help us identify duplicate kata and retire them.

  • Default User Avatar

    For Java translation, class names should be in mixed case with the first letter of each internal word capitalized
    e.g. class timeConverter => class TimeConverter.

    To make this change backward compatible with existing solutions, the following code can be used in the main test section:

      private  String covertTime(int seconds) {
        Class<?> converter = null;
        try {
          converter = Class.forName("TimeConverter");
        } catch (ClassNotFoundException ignore) {}
    
        try {
          if (converter == null) {
            converter = Class.forName("timeConverter");
          }
          Method toTime = converter.getDeclaredMethod("toTime", int.class);
          return (String) toTime.invoke(null, seconds);
        } catch (Exception cause) {
          throw new RuntimeException(cause);
        }
      }
    
  • Custom User Avatar

    function currentTime(){
    const current = new Date();
    const Time = current.getHours() + ":" + current.getMinutes() + ":" + current.getSeconds();
    console.log("'The current time is " + Time + "'" );
    }
    currentTime()

    So why does this fail the assesment it logs the time as requested but fails all the tests mind is boggled

  • Custom User Avatar

    This kata is a subject to deduplication process here: https://github.com/codewars/content-issues/issues/71
    Please join the discussion to share your opinions, and help us identify duplicate kata and retire them.

  • Default User Avatar

    In Python, you should delete the comment in sample tests

  • Default User Avatar

    Failed on empty array: "Unspecified Assertion Errors"
    The description doesn't mention anything about empty arrays, the assertion message isn't very helpful either.

  • Custom User Avatar

    Code in description is not language-specific.

  • Custom User Avatar

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

  • Custom User Avatar
  • Loading more items...