Question: 3. [10%] Write a piece of pseudo-code to plot the following graph. Assuming that the plotting function has been provided as DrawSquare (x,y,r), which draw
![3. [10\%] Write a piece of pseudo-code to plot the following](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f51afd0bce3_26066f51afc7dad6.jpg)
3. [10\%] Write a piece of pseudo-code to plot the following graph. Assuming that the plotting function has been provided as DrawSquare (x,y,r), which draw a square of size 2r with center (x,y) (1) Pseudo-Code to plot following graph. (4\%) (2) Write the recurrence equation for your algorithm. (3\%) (3) Plot the recursion tree to derive the solution of T(r). (3\%) (Note: r is the input size, which is the power of 2 . The time complexity for drawing one square is O(1) ). (Hint: The input of function can be: int x, int y, int r )
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
