Skip to content

Functionally Incorrect Baseline : Geometry - Convex_hull_perimeter & Convex_hull #37

Closed
@aswinkumar1999

Description

@aswinkumar1999

Issues:

  • Incorrect Turn Condition: The condition used to pop points while building the upper hull is wrong (it keeps right turns instead of left turns).
  • Incorrect Lower Hull Logic: The loop structure and point access used to build the lower hull are fundamentally flawed and do not follow the algorithm's requirements.
  • Naive Merging: The upper and lower hulls are simply concatenated, which likely results in duplicated start/end points in the final hull list.

Test Example:

Testing with these set of points gives us incorrect results:

{0, 0}, {4, 0}, {4, 4}, {0, 4}, {2, 2}

Expected : 16 ( Square of side 4 )
Got : 13.6569

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions