Live data from Hacker News

The ReadyForZero Programming Challenge

readyforzero.com

21–30 of 61 posts

Re: The ReadyForZero Programming Challenge

#21
post #18
post #16

Earlier quoted context omitted.

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.

Ah, that's the part I was missing. When I didn't see a digit in the first leaf I thought I had it wrong.

Re: The ReadyForZero Programming Challenge

#22

My answers in 31 lines of code: https://gist.github.com/1025860 I am either misreading the third problem's description, or I have a bug I can't for the life of me see, because the answer my program puts out is not accepted.

The third problem is looking to partition the entire sequence of numbers into contiguous subsequences, all of which add up to the same sum. In other words, if the list were 23415, you subsequences could be 23, 41 and 5, all equaling 5. But the subsequences have to use up the entire string and they can't overlap.

Re: The ReadyForZero Programming Challenge

#23

My answers in 31 lines of code: https://gist.github.com/1025860 I am either misreading the third problem's description, or I have a bug I can't for the life of me see, because the answer my program puts out is not accepted.

> #pip install python-levenshtein > from Levenshtein import distance

That doesn't seem in the spirit of the challenge.

Re: The ReadyForZero Programming Challenge

#24
post #18
post #16

Earlier quoted context omitted.

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.

I still don't follow. Digit value rather than ASCII code... you mean Base64 digit value? If so, do you just ignore the pad char? (I mean... by "non-digit leaves" you are referring to the leaves represented by '=' and only those?)

EDIT: I understand now... jeez that was a run-around! Ascii encoded decimal! Thanks for the clarifying replies all over.

Re: The ReadyForZero Programming Challenge

#25
post #24
post #18

Earlier quoted context omitted.

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.

I still don't follow. Digit value rather than ASCII code... you mean Base64 digit value? If so, do you just ignore the pad char? (I mean... by "non-digit leaves" you are referring to the leaves represented by '=' and only those?) EDIT: I understand now... jeez that was a run-around! Ascii encoded decimal! Thanks for the clarifying replies all over.

I think it's literally one ASCII code (byte) per each of the 1023 nodes in the tree. Any time there's a non-digit in one of the leaf positions you ignore it.

Re: The ReadyForZero Programming Challenge

#26
post #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 ma…

Very good points. The computer screen wasn't that large so I tried to keep the descriptions short. :)

Re: The ReadyForZero Programming Challenge

#27

My answers in 31 lines of code: https://gist.github.com/1025860 I am either misreading the third problem's description, or I have a bug I can't for the life of me see, because the answer my program puts out is not accepted.

> #pip install python-levenshtein > from Levenshtein import distance That doesn't seem in the spirit of the challenge.

Can you do it in linear time in the length of the input?

Re: The ReadyForZero Programming Challenge

#28
post #24
post #18

Earlier quoted context omitted.

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.

I still don't follow. Digit value rather than ASCII code... you mean Base64 digit value? If so, do you just ignore the pad char? (I mean... by "non-digit leaves" you are referring to the leaves represented by '=' and only those?) EDIT: I understand now... jeez that was a run-around! Ascii encoded decimal! Thanks for the clarifying replies all over.

There's no Base64, it's just regular ASCII, for each leaf that has an ASCII character '0' through '9', you sum 0 through 9 respectively.

Re: The ReadyForZero Programming Challenge

#29
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?

The characters should be interpreted as ASCII.

Re: The ReadyForZero Programming Challenge

#30
post #19

> Are you ready to get out of credit card debt? > ReadyForZero is a free online financial tool that lets you track your credit card debt ... what is this? some kind of a sick SEO experiment? flagged for spam.

Not an SEO experiment - trying to hire smrt people!
Post reply on HN