Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

51.

What will be the slope of the line given by ax + by + c = 0?(a) -a/b(b) -b/a(c) -c/a(d) a/cI got this question by my school principal while I was bunking the class.The doubt is from Computational Geometry in chapter Computational Geometry of Data Structures & Algorithms II

Answer»

The correct option is (a) -a/b

The BEST explanation: The slope of a line given by the equation ax + by + c=0 has the slope of -a/b. So two LINES having the same ratio of the coefficient of X and y will be parallel to each other.

52.

What is the distance between the lines 3x-4y+7=0 and 3x-4y+5=0?(a) 1 unit(b) 0.5 unit(c) 0.8 unit(d) 0.4 unitThis question was addressed to me at a job interview.Question is taken from Computational Geometry in section Computational Geometry of Data Structures & Algorithms II

Answer»

The correct option is (d) 0.4 UNIT

Explanation: As the GIVEN LINES are parallel so the DISTANCE between them can be calculated by using the formula (c1-c2)/(√a^2+b^2). So we get the distance as 0.4 unit.

53.

What is the shortest distance between the line given by -2x + 3y + 4 = 0 and the point (5,6)?(a) 4.5 units(b) 5.4 units(c) 4.3 units(d) 3.3 unitsThis question was addressed to me during an online exam.My query is from Computational Geometry in division Computational Geometry of Data Structures & Algorithms II

Answer»

The correct OPTION is (d) 3.3 units

The best explanation: The shortest distance between a LINE and a point is given by the formula (ax1+by1+c)/(√a^2+b^2). USING this formula we GET the ANSWER 3.3 units.

54.

The shortest distance between a line and a point is achieved when?(a) a line is drawn at 90 degrees to the given line from the given point(b) a line is drawn at 180 degrees to the given line from the given point(c) a line is drawn at 60 degrees to the given line from the given point(d) a line is drawn at 270 degrees to the given line from the given pointI have been asked this question during a job interview.My question is from Computational Geometry in chapter Computational Geometry of Data Structures & Algorithms II

Answer» RIGHT ANSWER is (a) a line is DRAWN at 90 degrees to the given line from the given POINT

Easy EXPLANATION - The shortest distance between a line and a point is achieved when a line is drawn at 90 degrees to the given line from the given point.