Company: Nokia_14june
Difficulty: medium
Coding Question 1: Convex Boundary Detection Problem Statement A set of trees is planted on a 2D plane, where each tree is represented by its Cartesian coordinates (x, y). You need to build a fence around the entire group of trees. The fence should enclose all trees and pass through the outermost trees. Return all trees that lie on the boundary of the fence. Important: Include all trees lying on the perimeter. If multiple trees are collinear on the boundary, include all of them. Return the points in lexicographical order. Function vector<vector<int>> findBoundaryTrees(int N, vector<vector<int>> trees) Constraints 1 ≤ N ≤ 3000 0 ≤ x, y ≤ 10^4 Sample Input: 6 1 1 2 2 2 0 2 4 3 3 4 2 Output: 1 1 2 0 2 4 3 3 4 2