00:01
Alright, for this question, we're asked.
00:02
Alice has three array -based stacks, and each of them has its own capacity.
00:07
Initially, a is full, and b and c are empty, but unfortunately, the person who programmed the class for these stacks made the push and pop method that's private.
00:15
So the only method that alice can use is static method dump, which transfers by iteratively applying the pop and push methods from stack s to stack t until either s becomes empty or t becomes full.
00:28
So basically keeps on applying it until one is empty or one is full.
00:32
So for example, starting from our initial configuration, performing a dump ac will result now in a holding 97 and since b only has a capacity of 5 and c only has a capacity of 3, a will have 97, c will have 3.
00:48
So we have to describe a dump operations that start from the initial configuration and result in b holding four elements at the end.
00:55
So we can think of this as a bin type of problem.
00:57
So at the start, we know a is full.
01:03
B and c are empty.
01:07
We know a has 100 and it's full.
01:10
And c, so we know the capacity of a, capacity of b, capacity of c is 5, and capacity of c is 3.
01:20
So we need to represent each of the stacks in terms of their sizes currently.
01:24
So s -a will be 100...