May someone help me with this problem.. from the laboratory
For this homework you are required to read either from the keyboard or from a file a graph.
The graph can have as many nodes as the user wants.
Each node represents a point and is made of two integer coordinates x and y. Both coordinates are in the interval [0,100].
To complete the graph definition, the user will also insert the edges between the points. The points and the edges will form various geometrical forms, if well defined.
Once the graph has been defined, perform the following tasks:
1. Verify if there are any point duplicates.
2. Verify if the graph is connected.
A graph is connected when, from any point one can get to any other point.
3. Compute all the distances made of two consecutive edges and print them out.
4. Verify if there are any triangles in the graph of points.
5. Verify if there are any rectangles in the graph of points.
Bonus (20 points):
Store the valid triangles in a hash map structure.
Choose the right key definition and the hash function so that you can store all the triangles of the problem and retrieve them.