Question: Python Pick the Points There are many sets of points on the horizontal axis of a co - ordinate plane. If a point is plotted

Python
Pick the Points
There are many sets of points on the horizontal axis of a co-ordinate plane. If a point is plotted in between any set, that set is reduced to that point. Given X sets, find the minimum number of points one should pick to reduce all the points to minimum number of points.
Input Specification:
input1: X. number of sets.
input2: Array consisting of X pairs, each pair indicating start and end of a set.
Output Specification:
Return an integer number as per the question.
Example 1:
input1: 3
input2: ((1.3)(2.5).(3.6))
Output: 1
Example 2:
input 1:3
input2: ((1.3).(2.5).(6.9))
Output: 2

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!