@vaibhav this fails as n will be provided in the question. On Sun, Jul 10, 2011 at 9:56 PM, vaibhav shukla <vaibhav200...@gmail.com>wrote:
> wastage can be minimized if side of square is maximized. > so largest size of square would be = H.C.F of width and height . > > and also number of squares needed will be = (width*height)/side^2 . > > > > On Sun, Jul 10, 2011 at 9:11 PM, Akshata Sharma <akshatasharm...@gmail.com > > wrote: > >> Given a rectangle with known width and height, design an algorithms to >> fill the rectangle using n squares(n is integer, also given) and make sure >> in the result the wasting area is minimized. Length of square doesn't have >> to be integer. >> I.e, given width=3,height=2,n=5, one solution is that rectangle can be >> filled with five 1x1 squares and the wasting area is 1. Another solution >> could be filled with five 0.9x0.9 squares, but the wasting area is more than >> first solution. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Algorithm Geeks" group. >> To post to this group, send email to algogeeks@googlegroups.com. >> To unsubscribe from this group, send email to >> algogeeks+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/algogeeks?hl=en. >> > > > > -- > best wishes!! > Vaibhav Shukla > DU-MCA > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algogeeks@googlegroups.com. > To unsubscribe from this group, send email to > algogeeks+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.