Error
|
|
---|---|
@Ibrahim Nash | 6379 |
@blackshadows | 6329 |
@mb1973 | 5376 |
@Quandray | 5231 |
@akhayrutdinov | 5111 |
@saiujwal13083 | 4510 |
@sanjay05 | 3762 |
@marius_valentin_dragoi | 3522 |
@sushant_a | 3459 |
@verma_ji | 3357 |
@KshamaGupta | 3318 |
Complete Leaderboard | |
|
|
@184025 | 112 |
@terabaap123 | 99 |
@anamikaprasad124 | 92 |
@arshjit_singh7 | 92 |
@kumsachin10 | 90 |
@vaibhavinayak | 75 |
@NullPointerException | 74 |
@TanmayJ | 74 |
@ronaldo77 | 72 |
@bhupindersingh25122001 | 68 |
@ritiksethi21 | 68 |
Complete Leaderboard |
Convex Hull of a set of points, in 2D plane, is a convex polygon with minimum area such that each point lies either on the boundary of polygon or inside it. Now given a set of points the task is to find the convex hull of points.
Example 1:
Input: points_list = {{1,2},{3,1},{5,6}}
Output: {{1,2},{3,1},{5,6}}
Example 2:
Input : points_list = {{5,1},{4,4},{1,2}}
Output: {{1,2},{4,4},{5,1}}
Your Task:
You don't need to read or print anything. Your task is to complete the function FindConvexHull() which takes points_list as input parameter and returns Convex Hull of given points in a list. If not possible returns a list containing -1.
Expected Time Complexity: O(nlog(n))
Expected Space Complexity: O(n) where n = total no. of points
Constraints:
1 <= n <= 104
-105 <= x, y <= 105
We strongly recommend solving this problem on your own before viewing its editorial. Do you still want to view the editorial?
Yes