[Community Puzzle] Container Terminal

Hi guys,
I loved this puzzle !

I have one question, is there an issue with Kotlin answers ?
How can all my tests be green but none of the validators pass ? :face_with_raised_eyebrow:
(of course I didnā€™t hardcoded answers :wink:)

Anyone can help me ? I guess Iā€™m not allowed to paste my code here so Iā€™m quite stuck :worried:

Update : I rewrited my solution in Java (same algo) and all validators pass.
So I guess there might be an issue with Kotlin :cry:

2 Likes

I have the same problem, with Kotlin
canā€™t submit any of my solution with this language
so now I am rewriting them in python
Hope they fix it soon

Weā€™re looking into the Kotlin issue
@moon_invader @Bifton

1 Like

The puzzle statement is way too wordy. Felt like I was reading a charles dickens novel and the important information gets lost in the paragraphs. A more concise statement would be useful. As a side note, this problem seems much harder than it actually is. Maybe a note of that would help?

2 Likes

Very soon you will agree that a too wordy statement is much much better than a ā€œI assume you know everything so I will not say muchā€ statement.

Some spoiler hints are in this thread. Review them if you need to.

2 Likes

Just giving some ways to improve the statement, no need to take it personally. Yes, Iā€™d prefer a wordy statement over a wordless statement, but Iā€™d prefer a concise statement to both of those.

And I solved the puzzle just fine,not sure where I implied I needed it, but thanks for the passive aggressive tip nonetheless lol.

1 Like

to me, your first message seemed more aggressive than @java_coffee_cupā€™s answer and didnā€™t imply you had solved the puzzle :wink:
Youā€™ve made your point about the length of the statement and the author has the right to disagree.

Why post? Just to agitate? He didnā€™t disagree with me either, he agreed it was wordy. He just doesnā€™t appear to care.

The point of the discussion area is to post comments and concerns, so itā€™s not aggressive to post constructive criticism. Getting mad and being like ā€œoh well if you need help feel free to search for someā€. Who asked for help lol? The problem is simple. Itā€™s just wordy.

Of course the community manager post to agitateā€¦ :roll_eyes:
You have not implied you need help, but neither the oppositeā€¦ And you are the one who became aggressive when @java_coffee_cup supposed you need someā€¦
The point of the discussion area of a puzzle is to speak about this puzzle. So if you have unrelated criticisms, please use a private message.
Well, since you posted your feedback and the author answered, lets close the digression.

1 Like

This is a great beginner problem, but it doesnā€™t really test implementation of stacks, since with a little thought about it, one realizes that its not necessary to keep track of stacks at all, just remember the set of the topmost values of all stacks. It is irrelevant how large the stacks are or what values lie under the topmost item in each stack, so you can forget about them.

1 Like

I came here just to say this. I was suprised to see the stack skill tag on the results panel.

1 Like

Why in the example the stacking was: aab bcc , we could have done :ab abcc, ? Or whatā€™s the ā€œefficientā€ rule, i undestand that when ship b come, it can take the two container at once, but it doesnt do A. So do i go with the less stacking area or is there something else?

By the statement, ā€œefficientā€ means using the least ground areas, and no need to retrieve a container from middle of a stack.

Although the solution of the problem is actually simple, I donā€™t think this problem should be an ā€œeasyā€ problem because the solution is not as straightforward as other problems in the same category. Does anyone agree? Just wanted to share my opinion here

I understand this is supposed to be solved using stacks, but while looking at the pattern, it felt like it was a Longest Increasing Subsequence problem. My code got accepted with it but I wonder if there are any cases where it might fail.

First iteration put M on first stack.
Second iteration puts I on top of M on first stack.
Third iteration canā€™t put W on first stack, so a new stack is created with W.
ā€¦

According to me you donā€™t need stacks to solve this because it is not the requirement to produce the content of the stacks. You only need to return the number of stacks, so you only need to keep track of the top container of each stack, to see if you can put the new container on top of it or not.