4 kyu

Compute a convex hull

297 of 433dustryder
Description
Loading description...
Algorithms
Geometry
View
AllIssues2Questions1Suggestions7Show Resolved
  • Please sign in or sign up to leave a comment.
  • saudiGuy Avatar
  • benjaminzwhite Avatar

    This comment has been hidden.

  • greenjaed Avatar

    For those attempting this Kata without outside help, assuming all points are part of the hull and then reducing them is the WRONG approach. It will work, but it's not performant enough (at least for some languages) and you will time out.

  • Zhalktis_v1.0 Avatar

    Python submission Attempt test cases are all failing; the input and output are switched places. I copypasted them to my own tests: they pass, the test data itself is ok.

    Meanwhile the given Sample tests are working correctly.

  • RealKenshiro Avatar

    Thank you for this interesting Kata!

  • MobulaKuhlii Avatar
  • urxvtcd Avatar

    Hey guys, regarding the Haskell translation, in one of the hardcoded tests it expects a hull of [(1.0,20.0),(5.0,6.0),(6.0,20.0),(15.0,19.0),(19.0,4.0),(20.0,4.0)], which doesn't make sense...? Going from first to second to third means turning left, and from second to third to fourth means turning right, but should't we only turn in the same direction? Or am I missing something?

  • LeTaPe Avatar

    Random test solutions appear to be wrong (python). one point is always missing, which belongs to the convex hull. e.g. ([points],[given solution],[Real convex hull]): ([[86, 42], [78, 14], [68, 22], [25, 66], [94, 10], [6, 40], [30, 9], [14, 63], [12, 80], [36, 60], [28, 15], [67, 39], [31, 36], [38, 76], [9, 49], [29, 59], [8, 70], [98, 83], [80, 96], [63, 27], [74, 10], [79, 69], [59, 9], [42, 80], [81, 59], [19, 39], [48, 35], [92, 34], [70, 33], [72, 84], [51, 56], [85, 56], [49, 66], [41, 95], [54, 43], [72, 64], [98, 82], [36, 30], [53, 22], [83, 27], [5, 52], [72, 21], [53, 88], [44, 33], [33, 81], [32, 21], [79, 8], [24, 80], [25, 97], [68, 19]],[[5, 52], [6, 40], [8, 70], [12, 80], [25, 97], [30, 9], [79, 8], [80, 96], [94, 10], [98, 82]],[[5, 52], [6, 40], [8, 70], [12, 80], [25, 97], [30, 9], [79, 8], [80, 96], [94, 10], [98, 82], [98, 83]])

  • hobovsky Avatar

    C# translation available. Please review and if you like it, I can prepare other ones (Java, C, C++).

  • narayanswa30663 Avatar

    Crystal translation is virtually identical to the Ruby translation; awaiting approval.

  • JohanWiltink Avatar
  • narayanswa30663 Avatar

    Ruby translation available here. Could someone take a look?

  • FArekkusu Avatar

    JavaScript translation ready! Waiting for approval...

  • Blind4Basics Avatar

    needs random tests

  • g964 Avatar

    Are you still active?

  • zellerede Avatar

    Nice kata.

  • sfr Avatar

    Starting code had method name covex_method but sample and final tests require hull_method. Starting function should be hull_method.