• 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
Ready4Droid Avatar
Name:Unknown
Clan:Home
Member Since:Nov 2018
Last Seen:Nov 2022
Profiles:
    Following:495
    Followers:495
    Allies:495
    View Profile Badges
    • Stats
    • Kata
    • Collections
    • Kumite
    • Social
    • Discourse
    • Conversations (5)
    • Replies
    • Authored
    • Needs Resolution
    • Custom User Avatar
      • Ready4Droid
      • commented on "Backspaces in string" cpp solution
      • 5 years ago

      my comment was 2 years ago, i think it was originally meant for someone that wasnt checking for empty first (or size>0). its fine if checking size/empty first and is well defined. again, it was 2 years ago, so i dont recall exactly at that time ;).

    • Custom User Avatar
      • Xin-Shiyu
      • commented on "Backspaces in string" cpp solution
      • 5 years ago

      Why? I see on cppreference that it has been in standard since C++11. Since the solution has already tested if the result is empty, I think there won't be any undefined behavior here.

    • Custom User Avatar
      • Durdo
      • commented on "Alphabet war - airstrike - letters massacre" cpp solution
      • 7 years ago

      Yes, actually we have a problem right here. Just checked and std::string does not terminates in NULL, I thought that was the case.

    • Custom User Avatar
      • Ready4Droid
      • commented on "Alphabet war - airstrike - letters massacre" cpp solution
      • 7 years ago

      Yes, index is out of range and can lead to undefined behavoir. Should really be checking for i>0 and i<fight.size()-1

    • Custom User Avatar
      • Ready4Droid
      • commented on "Backspaces in string" cpp solution
      • 7 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...