• 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
Glinator Avatar
Name:Unknown
Clan:ENSI
Member Since:Dec 2020
Last Seen:Jun 2025
Profiles:
Following:40
Followers:32
Allies:26
View Profile Badges
  • Stats
  • Kata
  • Collections
  • Kumite
  • Social
  • Discourse
  • Conversations
  • Replies
  • Authored (223)
  • Needs Resolution
  • Custom User Avatar
    • Glinator
    • commented on ""Pascal's Triangle" OCaml Translation"
    • 4 months ago

    Reading back this fork, I realise that the pretty-printing leaks the expected number of elements. I don't know whether that's a good idea.

  • Custom User Avatar
    • Glinator
    • commented on ""Pascal's Triangle" OCaml Translation"
    • 4 months ago

    Yeah I'll have some trouble remembering what I was thinking three years ago, so I don't remember why I did it that way.

    There are indeed two possibilities:

    • Use a fixed length integer type and limit the input values
    • Use a bignum type

    I went with the first one for some reason; someone could change the translation to the second if it seems like a good idea.

  • Custom User Avatar
    • Glinator
    • commented on "Simple multiplication" cpp solution
    • 10 months ago

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

  • Custom User Avatar
    • Glinator
    • commented on "Compare within margin" rust solution
    • 10 months ago

    Woops the formatting is botched, my bad

  • Custom User Avatar
    • Glinator
    • commented on "Efficient Cooking" kata
    • 10 months ago

    I only saw your reply when I posted mine and the page refreshed. At least you got a second confirmation.

  • Custom User Avatar
    • Glinator
    • commented on "Efficient Cooking" kata
    • 10 months ago

    Is 44 your answer or the expected answer ? Because 39 seems correct to me.

    • First do step 1, 2 and 4 (takes 13 minutes)
    • Then do step 6 in the background (will last for 21 more minutes)
    • Do steps 3 and 5 while the carrots boil (doesn't take time as step 6 is longer)
    • Finish with steps 7 and 8 (takes 5 minutes)

    13 + 21 + 5 = 39

  • Custom User Avatar
    • Glinator
    • commented on "Schrödinger's Boolean" rust solution
    • 10 months ago

    In assert_eq!(...), when the two values compare unequal, the macro needs to print them and does so with the Debug trait.

    You can take a look at the signature of assert_failed in core::panicking.

  • Custom User Avatar
    • Glinator
    • commented on "Regular expression for binary numbers divisible by 5" kata
    • 2 years ago

    The point of this kata is not to write a function boolean isDiv5(String s), but to create a regular expression that will match all strings that represent in binary a number divisible by five and only these strings.

    For example, this regular expression should match "101", "0" and "1111" because they represent 5, 0 and 15.
    But it should not match "111", "10000" nor "1" as they represent 7, 16 and 1.

  • Custom User Avatar
    • Glinator
    • commented on "Regular expression for binary numbers divisible by 5" python solution
    • 2 years ago

    You mad genius

  • Custom User Avatar
    • Glinator
    • commented on "Simple Fun #159: Middle Permutation" kata
    • 2 years ago

    You are doing WAY too much work generating all the permutations. Let's take the example in the description :

    The whole list of permutations of "abc" is ["abc", "acb", "bac", "bca", "cab", "cba"], and the answer is "bac".

    Do you really need to know that "abc" comes before "acb" to determine the middle permutation ? No you don't.
    Do you even need to generate them ? Once again, no you don't. After all, 'a' is the very first letter in order, so there's not much chance for it to be the middle permutation's first letter.

  • Custom User Avatar
    • Glinator
    • commented on "Hello World - Without Strings" python solution
    • 2 years ago

    It's really quite simple, actually : look at the fork.

    Edit : similar solution (except that I used 128 instead of 1000)

  • Custom User Avatar
    • Glinator
    • commented on "Binaries" kata
    • 3 years ago

    Without leading zeros. k is 2 for d=3.

  • Custom User Avatar
    • Glinator
    • commented on "The Little Typer: Values, Functions and Currying" ocaml solution
    • 3 years ago

    You may find the range patterns useful ;-)

  • Custom User Avatar
    • Glinator
    • commented on "Sum of Intervals" kata
    • 3 years ago

    By rethinking how to approach this problem.

    Do you actually need to count from 1 to a million to know that there are indeed a million integers from one to a million? You could, sure, but I really hope you didn't answer yes.

    Now think about the intervals [0, 10] and [5, 15]: they can be reduced to [0, 15], but why ?

  • Custom User Avatar
    • Glinator
    • commented on "Effective Resistance of a Simple Circuit" kata
    • 3 years ago

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

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

Confirm

  • Cancel
  • Confirm

Collect: undefined

Loading collection data...