CDVNT01C - Editorial

PROBLEM LINK:

Practice

Contest: CodeVenture 1.0

Setter: Nisarg Thakkar

Tester: Jaydeep Mulani

Editorialist: Malhar Patel

DIFFICULTY:

Easy-medium

PREREQUISITES:

Nothing

PROBLEM:

The idea behind the problem boils down to following : You are given N points on a 2D Matrix and you have to find the minimum number of lines required to penetrate all of them.

EXPLANATION

If you closely observe the problem, then you can deduce that you have to just count the number of points having the same slope and then print the number of distinct slopes that you have calculated.

SOLUTIONS:

CPP Solution

Code

Feel free to Share your approach, if you want to. (even if it’s the same :stuck_out_tongue: ) . Suggestions are welcomed as always. :slight_smile: