An algorithm

• Write an algorithm which, given a list of rectangles and a circle, finds any rectangle which intersects the circle.
◦ Explain the problem, including how the rectangles and the circle are represented as data. State the required inputs and outputs, and give examples.
◦ Explain what subproblems must be solved.
◦ Explain your algorithm, perhaps including a step-by-step example.
◦ Present your code, and refer to it in your explanation. ◦ Show the results of testing your algorithm.




Sample Solution

find the cost of your paper