public List<Point> executeQuickHull(List<Point> inputPoints) {
        List<Point> convexHull = new ArrayList<>();
        if (inputPoints.isEmpty()) {
            throw new IllegalArgumentException("Cannot compute convex hull of zero points.");
        }

        // search extreme values
        Point rightmostPoint = inputPoints.get(0);
        Point leftmostPoint = inputPoints.get(0);
        for (Point point : inputPoints) {
            if (point.getX() < rightmostPoint.getX()) {
                rightmostPoint = point;
            } else if (point.getX() > leftmostPoint.getX()) {
                leftmostPoint = point;
            }
        }
        
        // divide the set into two halfes
        List<Point> leftOfLine = new LinkedList<>();
        List<Point> rightOfLine = new LinkedList<>();
        for (Point point : inputPoints) {
            if (point.equals(rightmostPoint) || point.equals(leftmostPoint)) {
                continue;
            }
            if (point.isLeftOfLine(leftmostPoint, rightmostPoint)) {
                leftOfLine.add(point);
            } else {
                rightOfLine.add(point);
            }
        }
        
        convexHull.add(leftmostPoint);
        List<Point> hull = divide(leftOfLine, leftmostPoint, rightmostPoint);
        convexHull.addAll(hull);
        convexHull.add(rightmostPoint);
        
        hull = divide(rightOfLine, rightmostPoint, leftmostPoint);
        convexHull.addAll(hull);
        
        
        return convexHull;
    }