We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Cutting Paper Squares
Cutting Paper Squares
Sort by
recency
|
172 Discussions
|
Please Login in order to post a comment
This is an interesting problem !
Got stuck at 3/8 test cases ?
I thought it like this - for a nXm size. First make (m-1) vertical cuts or (n-1) horizontal cuts then make (n-1)*m horizontal cuts or (m-1)n vertical cuts, respectively. Let me know if the explanation is not clear, will try to improve it.
My golang solution
This thing was a nightmare for me when I was studying. I always used the Bamboo method to solve such questions. You should learn that method, it helped me pass with good marks.