• 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
gschandan Avatar
Name:G Chandan
Clan:Codeweavers
Member Since:Feb 2017
Last Seen:Feb 2024
Profiles:
Following:23
Followers:23
Allies:22
View Profile Badges
  • Stats
  • Kata
  • Collections
  • Kumite
  • Social
  • Discourse
  • Conversations (49)
  • Replies
  • Authored
  • Needs Resolution
  • Custom User Avatar
    • SrPanquesito
    • commented on "Simple Pig Latin" javascript solution
    • 3 years ago

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

  • Custom User Avatar
    • yman07
    • commented on "De Bruijn Sequences - Testing (Part 1)" kata
    • 4 years ago

    11231
    11[12.23,31 and 11] <= from first

    11231 for 3
    112[123,231, 311,111]

  • Custom User Avatar
    • gschandan
    • commented on "Easy Line" kata
    • 4 years ago

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

  • Custom User Avatar
    • gschandan
    • commented on "Array.diff" kata
    • 4 years ago

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

  • Custom User Avatar
    • Unnamed
    • commented on "De Bruijn Sequences - Testing (Part 1)" kata
    • 4 years ago

    But it still is independent of the length. That solution crashes only for n > length + 1.

  • Custom User Avatar
    • gschandan
    • commented on "De Bruijn Sequences - Testing (Part 1)" kata
    • 4 years ago

    Thanks, I've added an upper bound for n, it should be between 2 and 8 (inclusive).

  • Custom User Avatar
    • Unnamed
    • created an issue for "De Bruijn Sequences - Testing (Part 1)" kata
    • 4 years ago

    It looks like there's no upper bound for n dependent on the sequence length. In this case solutions like this can crash with out-out-range item access at large ns. Either tests with large ns or the upper bound for n should be added. (There are no such tests at least in Rust.)

  • Custom User Avatar
    • gschandan
    • commented on "De Bruijn Sequences - Generation (Part 2)" kata
    • 4 years ago

    Looks great to me.

  • Custom User Avatar
    • JohanWiltink
    • created a suggestion for "De Bruijn Sequences - Generation (Part 2)" kata
    • 4 years ago

    Haskell translation

    Please note I have updated the description: use double quotes for strings because Haskell reserves single quotes for single characters, moved the section explaining de Bruijn sequences up top, and minor updates to spelling, grammar and markup. If you disagree with any change, it can be changed again.

  • Custom User Avatar
    • JohanWiltink
    • resolved a question on "De Bruijn Sequences - Generation (Part 2)" kata
    • 4 years ago
  • Custom User Avatar
    • JohanWiltink
    • resolved a suggestion on "De Bruijn Sequences - Generation (Part 2)" kata
    • 4 years ago
  • Custom User Avatar
    • gschandan
    • commented on "De Bruijn Sequences - Generation (Part 2)" kata
    • 4 years ago

    That is true, that upper bound is probably too broad 😅
    I have amended the description as suggested and added the performance tag, many thanks.

  • Custom User Avatar
    • JohanWiltink
    • commented on "De Bruijn Sequences - Generation (Part 2)" kata
    • 4 years ago

    I don't think anyone will figure out that last big-O. I have seen worse, but it's quite ridiculous. :P

    I actually think "O(n), where n is length of output" would be the most understandable way of saying you have to be quite fast. And with tests ( or a test, at least ) of size 8^7, about 2 million, I can't imagine anything slower than that will work.

  • Custom User Avatar
    • gschandan
    • commented on "De Bruijn Sequences - Generation (Part 2)" kata
    • 4 years ago

    Thanks for the explanation and tips.
    RE: your last point, so would this be appropriate:
    Ω(k^n) and O(k!^(k^(n-1))/(k^n)) image title
    As we know at worst, they will generate every single de Bruijn sequence and then sort them?
    I'll do some more testing anyway and see what I can workout.

  • Custom User Avatar
    • gschandan
    • commented on "De Bruijn Sequences - Generation (Part 2)" kata
    • 4 years ago

    Yes, thanks for catching that! I have changed it now.

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

Confirm

  • Cancel
  • Confirm

Collect: undefined

Loading collection data...