Text File | 1998-06-08 | 1010 b | 37 lines | [TEXT/CWIE]
/*
Problem 12 - Perimeter
You are in charge of protecting a set of defenseless homeowners from predators that roam the area by constructing a fence of minimum length that encloses all of the homes.
The prototype for your solution is as follows:
typedef struct Node {
SInt32 xCoord;
SInt32 yCoord;
} Node;
void Perimeter(
UInt32 numHomes,
Node homesToEnclose[],
UInt32 *numNodesInPerimeter,
UInt32 nodesInPerimeter[]
);
You are given a list homesToEnclose of numHomes homes to protect by constructing a fence around the homes. You should return a list nodesInPerimeter of the numNodesInPerimeter homes to be connected by a fence. The fence must enclose all of the homes using the minimum amount of fencing material.
*/
#include "Solution.h"
// Fill in your solution and then submit this folder