• 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
WebDevN Avatar
Name:Unknown
Clan:Unknown
Member Since:Dec 2020
Last Seen:Apr 2021
Profiles:
    Following:1
    Followers:1
    Allies:1
    View Profile Badges
    • Stats
    • Kata
    • Collections
    • Kumite
    • Social
    • Discourse
    • Conversations (6)
    • Replies
    • Authored
    • Needs Resolution
    • Custom User Avatar
      • ejini战神
      • resolved a question on "#1 Matrices : Making an Alternating Sum" kata
      • 2 years ago

      The power++ logic in your code fails because it will only work for odd-length arrays (like 3x3 or 5x5 etc.)

      For the case of 3x3:

      true false true
      false true false
      true false true
      

      While, the case for even-sized arrays are (Using 4x4 as an example):

      true false true false
      true false true false
      true false true false
      true false true false
      

      is obviously wrong!

    • Custom User Avatar
      • WebDevN
      • commented on "#1 Matrices : Making an Alternating Sum" kata
      • 4 years ago

      Thanks for the help! I will try this :) Yes the image was pretty clear. Great.

    • Custom User Avatar
      • Nauj-Montes
      • commented on "#1 Matrices : Making an Alternating Sum" kata
      • 4 years ago

      Actually, I think that the image explain more than the example🤣🤣🤦🏽‍♂️

    • Custom User Avatar
      • Nauj-Montes
      • commented on "#1 Matrices : Making an Alternating Sum" kata
      • 4 years ago

      Hello there, yep, I did a code similar to yours, and I got the same results, I thought that I was right but in reality I didn't understand what the kata was asking for.

      Instead of going this way: 
      Matrix[0][0], Matrix[0][1], Matrix[0][2] .... ....
      
      Go with:
      Matrix[1][0], Matrix[2][0] .... and so on💁🏽‍♂️
      

      Here's a screenshot of both examples.
      https://lh3.googleusercontent.com/pw/ACtC-3ctdthT9WTq7pcMe2LwcIeXdI1j3RoMyETVwqd4tXiCrGw62_wk8Tcds7MNYBFLFtuUi7DfPvIVbSuYoz4PJ5-To3eKKVtyXMxVRk0t2xKG_CFowZKtJWywiBNKqlcP8v3b-f196HvmTxThd8w2hmtj=w1264-h647-no?authuser=0

      Use your calculator, and verify. Hope I helped you.

      Read this, and also, If you're posting code like that, mark it as spoiler.

      https://github.com/codewars/codewars.com/wiki/Troubleshooting-your-solution

    • Custom User Avatar
      • raulbc777
      • resolved a suggestion on "#1 Matrices : Making an Alternating Sum" kata
      • 4 years ago

      Thanks for this suggestion. I'll try to learn about this new and useful tool for maths.

    • Custom User Avatar
      • WebDevN
      • created a question for "#1 Matrices : Making an Alternating Sum" kata
      • 4 years ago

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

    • © 2025 Codewars
    • About
    • API
    • Blog
    • Privacy
    • Terms
    • Code of Conduct
    • Contact

    Confirm

    • Cancel
    • Confirm

    Collect: undefined

    Loading collection data...