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 coordinate 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:
input: X number of sets.
input: 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 :
input:
input:
Output:
Example :
input :
input:
Output:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
