Hi,
Please help me write a logic for the below:
A square paper is cut into 16 square pieces. Arrange the pieces to get the original form.
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted Jun 27, 2012, 5:32 AM
VulpesPosted Jul 19, 2012, 9:47 AM
The following program computes the numbers in the Fibonacci series (see link below) for values of n from 0 to 35 inclusive:
http://en.wikipedia.org/wiki/Fibonacci_number
Notice how the Fibonacci method is calling itself recursively in this line:
return Fibonacci(n - 1) + Fibonacci(n - 2);
As I said earlier, I can't see how you could use recursion to solve this 'paper-cutting' problem but if anyone else has any ideas, I'd be interested to hear them.
rani m mkPosted Jul 19, 2012, 12:53 AM
I thought we could use recursion,but i don`t know much about that so thought someone would guide..
VulpesPosted Jun 30, 2012, 6:37 AM
Although you can sometimes rewrite code to use recursion rather than iteration, I don't see how you could do that in any meaningful way here.
rani m mkPosted Jun 30, 2012, 12:21 AM
rani m mkPosted Jun 27, 2012, 4:28 AM
VulpesPosted Jun 26, 2012, 11:50 AM
If the square pieces can be of arbitrary size (subject to them fitting into the square paper), the question seems far too hard for a beginner or me for that matter!