Category Archives: Geometry

Triangle type

Write a function that receives three integer inputs for the lengths of the sides of a triangle and returns one of four values to determine the triangle type (1=scalene, 2=isosceles, 3=equilateral, 4=error). Generate test cases for the function assuming another … Continue reading

Posted in Geometry | Leave a comment

Determine If Two Rectangles Overlap

Given two axis-aligned rectangles A and B. Write a function to determine if the two rectangles overlap. Idea: 1. Think of the opposite statement: When they will not overlap. 2. When they do not overlap. The x range will not … Continue reading

Posted in Geometry | Leave a comment