• 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
Lordnibbler Avatar
Name:Ben Radler
Clan:Teespring
Skills:ruby, rails, javascript, node
Member Since:Dec 2013
Last Seen:Jul 2019
Profiles:
Following:11
Followers:14
Allies:10
View Profile Badges
  • Stats
  • Kata
  • Collections
  • Kumite
  • Social
  • Discourse
  • Conversations (178)
  • Replies
  • Authored
  • Needs Resolution
  • Custom User Avatar
    • metatable
    • created a suggestion for "A String of Sorts" kata
    • 26 days ago

    Lua translation

  • Custom User Avatar
    • Just4FunCoder
    • resolved an issue on "Hashtaggery" kata
    • 27 days ago

    All fixed in this fork

  • Custom User Avatar
    • Just4FunCoder
    • resolved an issue on "Change Machine" kata
    • 27 days ago

    Done in this fork

  • Custom User Avatar
    • Just4FunCoder
    • created a suggestion for "Metaprogramming Conjurer" kata
    • 27 days ago

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

  • Custom User Avatar
    • senior_kapitoshka
    • commented on "A String of Sorts" kata
    • 4 months ago

    thanks for the thorough answer!

  • Custom User Avatar
    • trashy_incel
    • resolved a question on "A String of Sorts" kata
    • 5 months ago
    • char* res=calloc(strlen(s),1);
      
      this does not account for the nul terminator (1 byte is missing)
    • char* res=(char*)malloc(strlen(od));
      
      same remark
    • if(*s=='\0'){
        return "";
      

    the tests expect the returned string to be free()-able. "" is a string literal that cannot be freed

    • if(*od=='\0'){
        char* cp=NULL;
        strcpy(cp,s);
      
    you are attempting to write at the null pointer here. this will crash. you have to allocate memory for `cp`.
    
    
    
    your code passes once all these are fixed.
    
  • Custom User Avatar
    • natan
    • commented on "A String of Sorts" kata
    • 9 months ago

    I'd try to reproduce it locally, at the very least you should be able to find out what inputs it happens for by printing (and flushing to ensure it isn't stuck in a buffer) and probably throw ASan or similar at it to see if it notices anything. Of course, it might be something unexpected going on in the test code that you can't reproduce yourself - for which I suppose very carefully finding out how your function should behave is a start.

    When i run your code against the tests and print out the indata, it turns out it does happen for an obviously special test case, so there's a good chance you don't need to dig any further than that.

  • Custom User Avatar
    • senior_kapitoshka
    • created a question for "A String of Sorts" kata
    • 9 months ago

    hello everyone! i'm newby in C and trying to solve this task, but failing in a random test: get SIGSEGV. what could be the reason? (code below)

  • Custom User Avatar
    • ejini战神
    • resolved a question on "A String of Sorts" kata
    • 17 months ago

    Sort string1 based on the corresponding character's positioning in string2. So, a comes first followed by b, then n, so banana becomes aaabnn

  • Custom User Avatar
    • ejini战神
    • resolved a suggestion on "A String of Sorts" kata
    • 2 years ago

    Approved

  • Custom User Avatar
    • saudiGuy
    • created a suggestion for "A String of Sorts" kata
    • 2 years ago

    python new test framework

  • Custom User Avatar
    • LosBlobbos
    • created an issue for "Change Machine" kata
    • 2 years ago

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

  • Custom User Avatar
    • LosBlobbos
    • created an issue for "Change Machine" kata
    • 2 years ago

    CS: last testcase expects {"1":4,"5":1,"10":0,"25":1366087610} but should be { '1': 4, '5': 1, '10': 0, '25': 2397957838778 } as stated 9 years ago. Still applies.

    Also no random tests and no sample tests.

  • Custom User Avatar
    • kaluginpeter
    • commented on "A String of Sorts" kata
    • 2 years ago

    Nice!

  • Custom User Avatar
    • hobovsky
    • resolved a suggestion on "Unlimited Sum" kata
    • 3 years ago

    Retired.

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

Confirm

  • Cancel
  • Confirm

Collect: undefined

Loading collection data...