Algorithm, and a blog post explaining it.

• 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.

• Explain what problem your algorithm solves. Specify the problem’s inputs and outputs, and give examples.
• Explain any subproblems you have identified.
• Explain how your algorithm works:
◦ What data structure(s) are used, and why?
◦ What are the key ideas?
◦ Are there any special cases which must be handled separately? ◦ It will help to work through an example step-by-step.
• Present your completed implementation of your algorithm. Don’t just give code – show how the code relates to your explanation.
• Demonstrate that you have tested your algorithm.

This question has been answered.

Get Answer

Leave a Reply