you're right, the definition is
"Say you have a collection of stackable objects, like blocks or boxes.
You need to stack them in a pyramid as tall as possible, so that no
more than 1-2 of the objects is at the top level, and so that each
layer is *larger than the first*,"
probably it should be *l
hey almost the same LOL. you type faster than me :)
On Mon, Jan 19, 2009 at 5:01 PM, Karthik Singaram Lakshmanan <
karthiksinga...@gmail.com> wrote:
>
> Well. I would suggest the following.
> If n is the number of stackable objects,
> You could compute the largest value of x such that x*(x+1)/2 <
OK, here's my algorithm:
Let n be the number of stacks.
start from 1 and begin making the levels, stop at m where n-((m-1)*m/2)<=m.
Put the stacks left to the level m-1.
here's the idea: number of stacks for each level is, starting from 1 and
increase by 1 at each step. So, it goes as, 1,2,3,...
1
2
4
I guess.
coskun...
On Mon, Jan 19, 2009 at 2:29 PM, manoj janoti wrote:
> Just want to know what will be the structure if the number of stackable
> objects is 7
>
> ~Janoti
>
>
> On Mon, Jan 19, 2009 at 11:17 AM, Darth Continent <
> darthcontin...@gmail.com> wrote:
>
>>
>> Hello, when I
root vertex). Maybe you can delete each vertex v
> when you scan each edge (u, v) but that doesn't seem right.
>
> If I'll get the solution I'll make sure to share it with you guys,
>
> Alex
>
> On Sep 17, 9:04 am, "Coskun Gunduz" <[EMAIL PROTECTE
Hi,
If I'm not wrong, you don't have to find a root node. You only need to check
if a given node u is root or not.
Actually O(E) seems too low to me for this. I think this problem can be
solved in O(E) if it's been reduced to some other problems.
I tried using prime factors, but couldn't make it
Hi,
try to see the problem in a different way; choosing 3 students from a group
of 7. This is a simpler point of view. Then let the other 4 students make
another group of size 4.
I recommend Revolving Door algorithm to find C(7,3), which is covered at
Knuth's TAOCP pre-fascicle 3a. There are also