[SOLVED] CSE222 Assignment 3

20.00 $

Programming resource
Digital learning resource
Category:
✓ Practical programming resource
✓ Suitable for guided study and reference
✓ Tutor guidance available when needed

Description

5/5 - (1 vote)

1Problem: You have mined a large slab or marble from a quarry. For simplicity, suppose the marble slab is a rectangle measuring n centimeters in height and m centimeters in width. You want to cut the slab into smaller rectangles of integral pieces (i.e. every small rectangle piece should be a cm by b cm dimension for positive integers a and b) of various sizes. You have a marble saw that can make either horizontal or vertical cuts across any rectangular slab. At any time, you can query the spot price P[x, y] by an x cm by y cm marble rectangle in O(1)-time, for any positive integers x and y.

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.