• 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
jrjosecarlos Avatar
Name:Unknown
Clan:Unknown
Member Since:Feb 2014
Last Seen:Apr 2017
Profiles:
Following:0
Followers:1
Allies:0
View Profile Badges
  • Stats
  • Kata
  • Collections
  • Kumite
  • Social
  • Discourse
  • Conversations (6)
  • Replies
  • Authored
  • Needs Resolution
  • Custom User Avatar
    • Minhounet
    • commented on "Triangular Treasure" java solution
    • 8 months ago

    Is not tail rec (can go on stackoverflow) and moreover Java does not support tail rec optimization.
    If you really want to go with rec mode you should use an accumulator.

  • Custom User Avatar
    • tacticalcacti
    • commented on "Triangular Treasure" java solution
    • 2 years ago

    Yep. The code will indeed go into an infinite recursion if n is less than 1 (negative number or 0), resulting in a stack overflow error.

  • Custom User Avatar
    • hayksmn
    • commented on "Triangular Treasure" java solution
    • 7 years ago

    Doesn't this go into an infinite loop if I put in ) or any negative number?
    if n == 0 then we call 0 + triangular(-1) and so on and so forth.

  • Custom User Avatar
    • CajunAzn7
    • resolved an issue on "Scoring Tests" kata
    • 10 years ago

    Thanks!

  • Custom User Avatar
    • jrjosecarlos
    • created an issue for "Scoring Tests" kata
    • 10 years ago

    It should have "arrays" instead of "strings" on its tags.

  • Custom User Avatar
    • Blacktazz89
    • commented on "Triangular Treasure" java solution
    • 10 years ago

    Doesn't work for negative input!

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

Confirm

  • Cancel
  • Confirm

Collect: undefined

Loading collection data...