## Lines and Curves

Question 1 |

Θ(n) | |

Θ(nlogn) | |

Θ(nlog ^{2}n) | |

Θ(n ^{2}) |

Question 1 Explanation:

For gradient to be maximum x

_{2}-x

_{1}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 straight line | |

a parabola | |

a circle | |

an ellipse |

Question 2 Explanation:

Note: Out of syllabus.

There are 2 questions to complete.