• 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
KKOKU Avatar
Name:KKOKU
Clan:Unknown
Member Since:Jun 2016
Last Seen:Apr 2025
Profiles:
Following:6
Followers:4
Allies:2
View Profile Badges
  • Stats
  • Kata
  • Collections
  • Kumite
  • Social
  • Discourse
  • Conversations
  • Replies (39)
  • Authored
  • Needs Resolution
  • Custom User Avatar
    • LesRamer
    • commented on "Next smaller number with the same digits" kata
    • 6 months ago

    Confirmed. Thanks. Was C# 12 added to Codwars last month (Nov '24)?

    https://www.codewars.com/post/whats-new-on-codewars-november-2024

    The OP wrote this question 5 months ago. I wanted to share the idea of identity-functions as an FP practice to anyone interested.

  • Custom User Avatar
    • hobovsky
    • commented on "Next smaller number with the same digits" kata
    • 6 months ago

    Order should be already available on CW for kata which have been migrated to C# 12.

  • Custom User Avatar
    • LesRamer
    • commented on "Next smaller number with the same digits" kata
    • 6 months ago

    Anyone remiss about not having Order can use OrderBy instead with an identity-function as the key-selector.

    int[] items = { 4, 1, 3, 2 };
    
    var sorted = items.OrderBy(x => x); // prior to .NET 7
    Console.WriteLine(string.Join(", ", sorted)); // 1, 2, 3, 4
    
    var sorted2 = items.Order(); // available after .NET 7
    Console.WriteLine(string.Join(", ", sorted2)); // 1, 2, 3, 4
    

    If you are so inclined, you can dig as deeply as you like into the implementations and overloads of these Order/OrderBy methods with the source that MS provides online. Be aware that Microsoft has gone to great lengths to make these perform well. Older, simpler implementations are available at Microsoft's reference-source site -- but these are frozen in time and won't include the latest things like this Order extension.

  • Custom User Avatar
    • trashy_incel
    • commented on "Next smaller number with the same digits" kata
    • 11 months ago

    at the bottom of the documentation for Order(), it is written:

    Applies to: .NET 9 and other versions: .NET 7, 8, 9

    checking .NET version on Codewars:

    Console.WriteLine(RuntimeInformation.FrameworkDescription); // .NET 6.0.16
    
  • Custom User Avatar
    • RileyHunter
    • commented on "Next smaller number with the same digits" kata
    • 11 months ago

    You're likely looking for the OrderBy method instead.

    If you Google "linq order enumerable" you'll find this kind of information easily :)

  • Custom User Avatar
    • dfhwze
    • commented on "Find the smallest" kata
    • 11 months ago

    Your code runs on your pc, in Java I suppose? toString and toCharArray are Java method names, not C#. Please have a look at C# reference guide: https://learn.microsoft.com/en-us/dotnet/api/system.int64.tostring?view=net-8.0

  • Custom User Avatar
    • abhishek jain
    • commented on "Find the missing term in an Arithmetic Progression" kata
    • 4 years ago

    may you send your code

  • Custom User Avatar
    • daniloxxv
    • commented on "Advanced Events" kata
    • 5 years ago

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

  • Custom User Avatar
    • mjsspencer
    • commented on "Common array elements" kata
    • 5 years ago

    Is it just efficiency or is it that you've made the nature of the random tests completely different from the basic? For example, the random arrays have some with 2,1,1 of the same element. You put no such examples in the basic and wrote nothing of what should be done in that scenario in the description. EDIT: Okay I solved it, forgive me for questioning your infinite wisdom ;)

  • Custom User Avatar
    • Chrono79
    • commented on "Calculate BMI" kata
    • 7 years ago

    Read other posts about it, it's a floating point representation problem.

  • Custom User Avatar
    • daveeee
    • commented on "Calculate BMI" kata
    • 7 years ago

    I agree, this seems broken.

  • Custom User Avatar
    • suarezali75
    • commented on "The position of a digital string in a infinite digital string" kata
    • 7 years ago

    The most challening task is to be able to detect a pattern. If the string is split into smaller pieces and these pieces are consecutive to eachother you might have found a pattern. Once you have the pattern you can calculate the position of the first number of the pattern. I am trying to help without spoling the kata.

    By the way, myjinxin2015, this is one of the mosy singular and challenging katas I have done. Congratulations. Keep it up!

  • Custom User Avatar
    • user6793616
    • commented on "Infix to Postfix Converter" kata
    • 7 years ago

    I solved the JavaScript one just now. No problems. NB: there is no need to repeat the same comment 3 times.

  • Custom User Avatar
    • cyril-lemaire
    • commented on "The position of a digital string in a infinite digital string" kata
    • 7 years ago

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

  • Custom User Avatar
    • myjinxin2015
    • commented on "The position of a digital string in a infinite digital string" kata
    • 7 years ago

    Perhaps you can starting from this kata, which is simpler one:
    https://www.codewars.com/kata/challenge-fun-number-8-numbers-concatenation/discuss#5abccc77a88ee7496a0000cb

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

Confirm

  • Cancel
  • Confirm

Collect: undefined

Loading collection data...