• Sign Up
  • Kata
  • Kumite
  • Blog
  • Forum
  • Wiki
  • Leaders
  • Log In
  • Sign Up
Name:Nick Haras
Clan:Microverse
Skills:javascript, ruby, rails, sql, html5, css3, jest, rspec
Member Since:Mar 2018
Last Seen:Feb 2021
Profiles:
Following:204
Followers:206
Allies:198
View Profile Badges
  • Stats
  • Kata
  • Collections
  • Kumite
  • Social
  • Discourse
  • Conversations (218)
  • Replies
  • Authored
  • Needs Resolution
    • macnick
    • commented on "Merged String Checker" javascript solution

    This is a good implementation of the recursive approach. Which is the first thing that comes to mind when interviewing. The problem with this solution, is time complexity which is O(2^n) where n is the length of s. A better approach is to use Dynamic programming. Then the time and space complexity become O(p1p2) where p1 is the length of part1 and p2 the length of p2.

    • macnick
    • commented on "Gravity Flip" kata

    Make some simple expamples like [4,2,1,3] test it with 'R' an with 'L', try to see if you notice a pattern

    • Piot1998
    • commented on "Gravity Flip" kata

    What do you mean specifically?

    • macnick
    • commented on "Tidy Number (Special Numbers Series #9)" javascript solution

    That is an interesting question.
    I could have converted them first to numbers but it is not needed.
    JavaScript string comparison is alphabetical. Alphabeticaly '11' is less than '12'. That is how it works.

    • KhaledBadarna
    • commented on "Tidy Number (Special Numbers Series #9)" javascript solution

    how does this work for you ?, i mean how can you check if one parameter bigger than the other while both are strings!!! ?

    • macnick
    • commented on "Character with longest consecutive repetition" kata

    !

    • macnick
    • commented on "Gravity Flip" kata

    Here is some advice how to approach this. Solve some examples on paper first. Notice what happens. Then coding the solution is easy.

    • macnick
    • commented on "Gravity Flip" kata

    !

    • macnick
    • commented on "Simple min heap implementation" kata

    !

    • macnick
    • commented on "What is between?" javascript solution

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

    • operaymond
    • commented on "What is between?" javascript solution

    I really wanted to use Array.from() in my solution, but couldn't make it work. Only got this far:

    const between2 = (num1, num2) => {
    return Array.from({ length: num2 }, (_, i) => i + 1)
    }

    Could you please explain how yours works so I can understand it? MDN only has a simple example of it.

    • macnick
    • commented on "Big to Little Endian" kata

    !

    • macnick
    • commented on "The Vowel Code" kata

    Nice kata! I saw some really clever solutions and some good practices. Thanks.

    • macnick
    • commented on "Frog jumping" kata

    !

    • macnick
    • commented on "Making Change" kata

    !

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

Confirm

  • Cancel
  • Confirm