Friday 9 June 2017

Read a text file containing a set of flat polygons represented as one polygon per line

I have a task to do in NodeJS, I only need help to know where to start and any sort of guiding is highly appreciated.

This is the Task :

Read a text file containing a set of flat polygons represented as one polygon per line. Each line contains a comma-separated list of side lengths (for example “3,4,8,5,7”). Write a function to classify the set of polygons into four mutually exclusive subsets: triangles, rectangles, squares, and everything else. The union of all four subsets should be the original set of polygons. All the sides of the polygons are connected and the angles between them are irrelevant. Only consider the lengths.

Thanks a lot : )



via Sora YYa

No comments:

Post a Comment