Lines and Curves

Question 1
 
A
Θ(n)
B
Θ(nlogn)
C
Θ(nlog2n)
D
Θ(n2)
       Engineering Mathematics        Lines and Curves       Gate 2007-IT
Question 1 Explanation: 

For gradient to be maximum x2-x1 should be minimum. So, sort the points (in Θ(n logn) time) according to n coordinate and find the minimum difference between them (in Θ(n) time).
∴ Complexity = Θ(n logn + n) = Θ(n logn)
Question 2
 
A
a straight line
B
a parabola
C
a circle
D
an ellipse
       Engineering Mathematics       Lines and Curves       Gate-1995
Question 2 Explanation: 
Note: Out of syllabus.
There are 2 questions to complete.