• 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
MindWanderer Avatar
Name:Unknown
Clan:Hurricane Electric
Skills:php, javascript, html, css, jquery, mysql, networks
Member Since:Aug 2014
Last Seen:Nov 2019
Profiles:
Following:31
Followers:23
Allies:22
View Profile Badges
  • Stats
  • Kata
  • Collections
  • Kumite
  • Social
  • Discourse
  • Conversations (86)
  • Replies
  • Authored
  • Needs Resolution
  • Custom User Avatar
    • shoplucaaa
    • created a suggestion for "IPv6 address validation and contraction" kata
    • 3 months ago

    "ONE(?) or more consecutive groups of zeros can be eliminated" - this is confusing, if we trying "return the same address reformatted to the shortest possible length", but the actual requirement is not eliminating one group of zeroes ("a single group of zero should be left as-is"), we need better instruction

    So "contraction" also means expanding in this problem

    Input

    2a03:2880:2130:cf05:face:b00c::1

    Expected:

    2a03:2880:2130:cf05:face:b00c:0:1

  • Custom User Avatar
    • trashy_incel
    • created a suggestion for "IPv6 address validation and contraction" kata
    • 12 months ago

    the description does not specify which group of consecutive zeroes to compress when there are several groups tied for the longest sequence

    RFC 5952 does say:

    When the length of the consecutive 16-bit 0 fields
    are equal (i.e., 2001:db8:0:0:1:0:0:1), the first sequence of zero
    bits MUST be shortened. For example, 2001:db8::1:0:0:1 is [the] correct
    representation.

  • Custom User Avatar
    • ejini战神
    • commented on "IPv6 address validation and contraction" kata
    • 13 months ago

    Yes, I mean the latter. Many solutions only perform a singular assertion check for that specific fixed test only.

    Also, random tests should generate such cases, if possible shuffle and mix with other grouping of cases in which zeros appear in the middle (see below).

  • Custom User Avatar
    • hobovsky
    • commented on "IPv6 address validation and contraction" kata
    • 13 months ago

    AFAIK a contracted IPv6 form has no :::, the only contracted form is two colons, isnt it?

    https://en.wikipedia.org/wiki/IPv6_address#Representation

    Unless you mean the validation part and using ::: as invalid input?

  • Custom User Avatar
    • ejini战神
    • created an issue for "IPv6 address validation and contraction" kata
    • 13 months ago

    Description should be language-agnostic

  • Custom User Avatar
    • ejini战神
    • created an issue for "IPv6 address validation and contraction" kata
    • 13 months ago

    Missing sample and fixed tests for consecutive colons of longer than 3, i.e,

    • 0101:::::::

    • :::::0:1:0:1

    • 0A0B:0C0d::::28c1:1:2

    etc...

  • Custom User Avatar
    • Voile
    • created an issue for "IPv6 address validation and contraction" kata
    • 2 years ago

    The case with single group of zeroes appearing in the middle (instead of the ends) of a IPv6 address is missing in the fixed tests (when everything else is included in the fixed tests). It's only in the random tests.

  • Custom User Avatar
    • Voile
    • created an issue for "IPv6 address validation and contraction" kata
    • 2 years ago

    The kata is stuck at Node 8.

  • Custom User Avatar
    • Voile
    • created an issue for "IPv6 address validation and contraction" kata
    • 2 years ago

    IPv4 address component in IPv6 isn't tested.

  • Custom User Avatar
    • Voile
    • commented on "IPv6 address validation and contraction" kata
    • 2 years ago

    Every IPv6 kata kinda expects incorrectly contracted IPv6 address as input to be treated as valid, so...

  • Custom User Avatar
    • mr.zh6
    • commented on "IPv6 address validation and contraction" javascript solution
    • 3 years ago

    "Javascript's array.splice() function is terrible"? Really? I was quite happy, finding out it can do exactly what I was looking for :-) Thumbs up for the comments!

  • Custom User Avatar
    • eliafeliam
    • commented on "Who won the election?" java solution
    • 4 years ago

    Great!

  • Custom User Avatar
    • VCGDEV
    • commented on "Dubstep" java solution
    • 4 years ago

    awesome solution

  • Custom User Avatar
    • Awesome A.D.
    • commented on "IPv6 address validation and contraction" kata
    • 4 years ago

    Yes there are, but they are already compressed. Note the "::" in the inputs.

  • Custom User Avatar
    • user6720290
    • commented on "IPv6 address validation and contraction" kata
    • 4 years ago

    B090:2985:9000::6F39:00 -> expected 'b090:2985:9000::6f39:0'

    A01C:BA::140C:D:0640:002D -> expected 'a01c:ba::140c:d:640:2d'

    There aren't two consecutive groups of just 0 in either of these inputs, why are they valid?

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

Confirm

  • Cancel
  • Confirm

Collect: undefined

Loading collection data...