Live data from Hacker News

The ReadyForZero Programming Challenge

readyforzero.com

11–20 of 61 posts

Re: The ReadyForZero Programming Challenge

#11
post #10

Wasn't hard. The problems could be better explained, for example in the second one they should clarify that the binary tree is balanced and that each node is one character.

> binary tree is balanced and that each node is one character

I found that pretty intuitive given they tell us it is a tree with 2^n-1 nodes, and that this is then umber of characters in the text file.

What I'm wondering about is what the '=' pad character means in the context of non-valid base64 (i.e. isn't it the same as the 'A' character - a null?)

Re: The ReadyForZero Programming Challenge

#13
post #9

Reading the first problem, I think I am not ready for zero, it seems that the first problem is not well described.

You are looking for a sequence of 5 characters that differ by one character, but are otherwise identical (order matters). For example, an answer would be something like '89^hf' and '8z^hf'

Thanks, order matters that's what I missed.

Re: The ReadyForZero Programming Challenge

#15
post #14
post #10

Wasn't hard. The problems could be better explained, for example in the second one they should clarify that the binary tree is balanced and that each node is one character.

you're right - we should explain that it's balanced.

One quickly realises that you must mean a balanced tree, since otherwise there would be no unique solution, but it would still be nice if it was explicit in the text.

Re: The ReadyForZero Programming Challenge

#16
post #14
post #10

Wasn't hard. The problems could be better explained, for example in the second one they should clarify that the binary tree is balanced and that each node is one character.

you're right - we should explain that it's balanced.

Any comment in regard to my question above? At present, question 2 has serious ambiguity as to how one should interpret the data. Clearly each character represents one node, but again, there is no clear procedure for converting values. Padding makes no sense in this context.

Can you clarify?

Re: The ReadyForZero Programming Challenge

#17
The most difficult part was figuring out unspecified things in the problems. Generally I had to use my intuition about "otherwise this would be either impossible or too easy" to get the right answer.

The first problem should be more explicit about the nature of the difference: a "typo" or non-shared could reasonably be an omission of a character, which would mean that the position of the unknown character does not matter. This weaker problem has more than one correct answer for the given input data. Better to call it a "corrupted byte" or somesuch.

It should be explicitly stated that the tree is balanced in the second problem. It should also state that each node contains exactly one character or that all nodes have nonempty payload (you can figure out either of those pieces of information from the other one).

The third problem should specify that it's looking for a strict partition. Contiguous is not a strong enough requirement. As written, I can have as many "contiguous subsequences" of zero elements as I want located anywhere in the string.

I particularly like the third as a teaching problem, and I might have to use it sometime. It's pretty simple, not overly reliant on programming concepts, and the "clever" solution is both faster and easier to implement than the brute-force try-everything solution.

Re: The ReadyForZero Programming Challenge

#18
post #16
post #14

Earlier quoted context omitted.

you're right - we should explain that it's balanced.

Any comment in regard to my question above? At present, question 2 has serious ambiguity as to how one should interpret the data. Clearly each character represents one node, but again, there is no clear procedure for converting values. Padding makes no sense in this context. Can you clarify?

It's just as ASCII, you should sum the leaves that have ASCII digits (sum their digit value, not their ASCII code) and ignore the non-digit leaves.
Post reply on HN