Company: Goldman Sachs_22july

Difficulty: medium

Problem Statement

Drone Surveillance System Problem Description A logistics company runs an automated airspace-monitoring platform to keep its private airfield secure. On a 2D map of GPS coordinates, the platform has marked out a triangular restricted zone surrounding its data center. Any drone spotted inside that triangle counts as a potential intrusion. The platform continually records the live GPS position of every drone nearby. A drone is treated as having breached the restricted zone if its position lies inside the triangle, or exactly on its border. Write a program that reads the three vertices of the restricted zone followed by the positions of N drones, then prints the area of the restricted zone and the count of drones that have breached it. Use the following formula to compute the area of a triangle from its vertex coordinates (X1, Y1), (X2, Y2), (X3, Y3): Area = 0.5 * |X1(Y2 - Y3) + X2(Y3 - Y1) + X3(Y1 - Y2)| Read all input from STDIN and write all output to STDOUT. Do not print any extra tex

More Goldman Sachs_22july OA questionsInterview experiences