Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
I don't get to decide the kyu difficulty -- whoever approves the first language version makes that decision and it is stuck forever-after whether you or I like it or not.
This kata is 6 years old. The overall difficulty levels increased drastically since then.
so like is there an overpass at that station or what
Your solution is incorrect. The
.ThenBy(x => x.Value)
part in your solution does not conform to any requirement. The values of nodes should not be sorted, they should appear in oder of appearance on their "level".Please see how the "example 2" shows the order of nodes 8 and 4.
The following linked kata is a less performance-focused version of this kata.
https://www.codewars.com/kata/city-swim-2d-towerflood-and-plainflood
For users who find this (myjinxin's kata) too difficult to pass (based on performance-based constraints), the linked kata may be more suitable.
Some information:
In performance test, there are 100 testcases, each testcase given an array that contain 1000000 elements.
I'll add this to the description ;-)
This Kata is mainly to test your algorithm, you need a O(n) solution ;-)
I think no one liner can solve this kata ;-)