The ReadyForZero Programming Challenge
readyforzero.com
readyforzero.com
ReadyForZero appears to be a company that helps people get out of credit card debt by tracking what you owe to whom and recommending what to pay off in what order. They just got Series A funding.
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.
It was worth a shot.
And what's up with the green-on-black Mac screen?!
EDIT: my solutions (using Node.js) https://github.com/julienq/incubator/tree/master/misc/readyf...
https://gist.github.com/1029356
Thanks.
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.
You have to interpret "break up" to mean "non-overlapping" to claim that the problem means what you're saying it means; I found 341 "contiguous subsequences such that the sums of each of the subsequences are equal", but they overlap.
(If you had said "partition" I suspect I would have got what you meant)
That doesn't seem in the spirit of the challenge.
In practice, that would actually be slower on this input, because of the cost of initializing the bitset. But that is not dependent on the input, so computational complexity is unaffected.
edit: Removed description. Yes, you're right, you can't even look at the whole input in constant time.
edit: just for fun, as a one-liner:
def levenshtein(a,b): return sum(x!=y for x,y in zip(a, b))
edit 2: and just to clarify, I know this fails if the lengths of the input strings differ, they were guaranteed to be equal in my code.I "cheated" on the third one in that I read the discussion here which helped clarify the problem, non-overlapping, etc.
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?)
Can you clarify?
EDIT: I understand now... jeez that was a run-around! Ascii encoded decimal! Thanks for the clarifying replies all over.
> Forbidden (403)
> CSRF verification failed. Request aborted.
They should've checked that cookie exists. Or, better, not rely on cookies.
what is this? some kind of a sick SEO experiment? flagged for spam.