• Sign Up
    Time to claim your honor
  • Training
  • Practice
    Complete challenging Kata to earn honor and ranks. Re-train to hone technique
  • Freestyle Sparring
    Take turns remixing and refactoring others code through Kumite
  • Community
  • Leaderboards
    Achieve honor and move up the global leaderboards
  • Chat
    Join our Discord server and chat with your fellow code warriors
  • Discussions
    View our Github Discussions board to discuss general Codewars topics
  • About
  • Docs
    Learn about all of the different aspects of Codewars
  • Blog
    Read the latest news from Codewars and the community
  • Log In
  • Sign Up
goatffc Avatar
Name:Unknown
Clan:Unknown
Member Since:Feb 2017
Last Seen:Feb 2017
Profiles:
    Following:0
    Followers:0
    Allies:0
    View Profile Badges
    • Stats
    • Kata
    • Collections
    • Kumite
    • Social
    • Discourse
    • Conversations (19)
    • Replies
    • Authored
    • Needs Resolution
    • Custom User Avatar
      • Sennsei
      • commented on "Simple Fun #1: Seats in Theater" javascript solution
      • 5 years ago

      I think you like to write mini stories, but... I lost myself few times... 2 hours took me to solve this... I don't think the mini-books should be on 8kyu lvl.

    • Custom User Avatar
      • KeithPitcher83
      • resolved a question on "Invert values" kata
      • 9 years ago

      thank you!!!! how did i not see that!!!! done it now!

    • Custom User Avatar
      • myjinxin2015
      • commented on "Invert values" kata
      • 9 years ago

      to create a new array, don't modify arr

    • Custom User Avatar
      • MJKno1
      • commented on "Invert values" kata
      • 9 years ago

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

    • Custom User Avatar
      • KeithPitcher83
      • created a question for "Invert values" kata
      • 9 years ago

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

    • Custom User Avatar
      • Kessel309
      • commented on "Invert values" kata
      • 9 years ago

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

    • Custom User Avatar
      • goatffc
      • commented on "Invert values" kata
      • 9 years ago

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

    • Custom User Avatar
      • myjinxin2015
      • commented on "Simple Fun #1: Seats in Theater" javascript solution
      • 9 years ago

      For clarify:
      return array.filter((x,i)=>array.lastIndexOf(x)===i)[0] is incorrect
      It should be return array.filter(x=>array.indexOf(x)===array.lastIndexOf(x))[0]

    • Custom User Avatar
      • myjinxin2015
      • commented on "Simple Fun #1: Seats in Theater" javascript solution
      • 9 years ago

      I think the filter solution should be a O(n^2) solution.
      If you want, welcome try to solve this sreies:
      Find number in an array # 1
      Find number in an array # 2
      Find number in an array # 3
      Find number in an array # 4
      Find number in an array # 5
      Find number in an array # 6

    • Custom User Avatar
      • glynester
      • commented on "Simple Fun #1: Seats in Theater" javascript solution
      • 9 years ago

      Out of interest, what is the filter solution called if the other type of solution is a O(n) solution?

      What would the difference in speed be, of the one method over the other, for 1 million items?

    • Custom User Avatar
      • myjinxin2015
      • commented on "Simple Fun #1: Seats in Theater" javascript solution
      • 9 years ago

      Usually this is a reference message. It can help you determine what kind of code you are going to write. ;-) Of course, for this Kata, this information has no effect. But for some Kata, these information is your good friend ;-)
      For example: In a kata, the task is to find a unique number in an array(only one number is unique).
      If the author told you the length of array is less than 100. Well, return array.filter((x,i)=>array.lastIndexOf(x)===i)[0] is a valid solution. But If the author told you the length of array is more than 1000000, then you need to think about a O(n) solution to solve it. Because avoid code timeout has become a more important problem ;-)

    • Custom User Avatar
      • goatffc
      • commented on "Simple Fun #1: Seats in Theater" javascript solution
      • 9 years ago

      Gotcha. No complaints here.

      I just wanted to make sure that there wasn't something fundamentally wrong with my understanding of the kata and the described constraints. I'm new to this, so I'd rather check now than work under false pretenses.

    • Custom User Avatar
      • glynester
      • commented on "Simple Fun #1: Seats in Theater" javascript solution
      • 9 years ago

      I agree with you. Some kata descriptions (and katas) could be improved. However as people do it for nothing, we can't really complain even though sometimes it can be a bit frustrating.

    • Custom User Avatar
      • goatffc
      • commented on "Simple Fun #1: Seats in Theater" javascript solution
      • 9 years ago

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

    • Custom User Avatar
      • dinglemouse
      • commented on "Simple Fun #1: Seats in Theater" javascript solution
      • 9 years ago

      Hi @goatffc, AFAIK the intention of those constraints in the description was simply to say "here are the ranges of parameters that may be passed to your function", rather than "you must check these". i.e. The purpose is to make the Kata easier, not harder so you can concentrate on the solution instead of worrying about input validations... :-)

    • Loading more items...
    • © 2025 Codewars
    • About
    • API
    • Blog
    • Privacy
    • Terms
    • Code of Conduct
    • Contact

    Confirm

    • Cancel
    • Confirm

    Collect: undefined

    Loading collection data...