TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

The ReadyForZero Programming Challenge

45 点作者 ithayer将近 14 年前

20 条评论

gjm11将近 14 年前
Three problems, algorithm-centric, each solvable with (some intelligent thought and) a few lines of (say) Python. Unsurprisingly, the payoff is "we're hiring; please send us your resume".<p>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.
amalcon将近 14 年前
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.<p>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.<p>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).<p>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.<p>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.
评论 #2654941 未加载
评论 #2654801 未加载
nottodayy将近 14 年前
Reading the first problem, I think I am not ready for zero, it seems that the first problem is not well described.
评论 #2654442 未加载
kevinholesh将近 14 年前
From the source of the website: "&#60;!-- Are you looking at the source code? Like we'd put the answers here. Creative tho... --&#62;"<p>It was worth a shot.
gmaslov将近 14 年前
These are very similar to (and easier than most of) the Project Euler problems. <a href="http://projecteuler.net/" rel="nofollow">http://projecteuler.net/</a> -- Highly recommended for everyone.
评论 #2654509 未加载
pom将近 14 年前
That was a fun before-breakfast warmup; the input was always short enough that a simple, brute-force approach would usually work. The problem statements could have been made a little bit clearer though.<p>And what's up with the green-on-black Mac screen?!<p>EDIT: my solutions (using Node.js) <a href="https://github.com/julienq/incubator/tree/master/misc/readyforzero" rel="nofollow">https://github.com/julienq/incubator/tree/master/misc/readyf...</a>
owenjones将近 14 年前
Hello could someone help me with problem 2? I believe I am splitting the string correctly, 1 2 4 8 16 ... 512 = 1023 total chars/nodes, but when I add the integers of the last line (aka the leaves) I get the wrong result.<p><a href="https://gist.github.com/1029356" rel="nofollow">https://gist.github.com/1029356</a><p>Thanks.
sokolski将近 14 年前
My solutions: <a href="https://gist.github.com/1026309" rel="nofollow">https://gist.github.com/1026309</a> Didn't really stop and think on the first one for too long, so it's a bit messy. Overall it's quite easy but not trivial. Knowing the length of the challege at the beginnig wold be nice though.
llimllib将近 14 年前
My answers in 31 lines of code: <a href="https://gist.github.com/1025860" rel="nofollow">https://gist.github.com/1025860</a><p>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.
评论 #2654747 未加载
评论 #2654754 未加载
wccrawford将近 14 年前
Oh, that first question looks tasty. I dunno what a 'ReadyForZero' is, but the challenge could be fun.
decultured将近 14 年前
Fun challenge, but not too difficult. The largest challenge was making the intuitive leaps to discover the missing information in the questions, especially for problem two. A bit of trial and error, and a few lines of Python made for quick testing of those assumptions.
ralphc将近 14 年前
Solutions in Clojure <a href="https://gist.github.com/1033605" rel="nofollow">https://gist.github.com/1033605</a><p>I "cheated" on the third one in that I read the discussion here which helped clarify the problem, non-overlapping, etc.
评论 #2686283 未加载
dhugiaskmak将近 14 年前
Here are my solutions for #1 and #3. I cheated on #2 just like everyone else.<p><a href="https://gist.github.com/1026404" rel="nofollow">https://gist.github.com/1026404</a>
drdo将近 14 年前
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.
评论 #2654507 未加载
评论 #2654545 未加载
评论 #2655016 未加载
DanielStraight将近 14 年前
I don't usually do these challenges, but this one was pretty fun. It's three problems long. Took me about 30 minutes.
genesiss将近 14 年前
I enjoyed solving these. Last one is cool, but hint is too obvious ;&#62;
drdaeman将近 14 年前
When one has cookies disabled (and those days I believe everyone should) it throws Django error page:<p>&#62; Forbidden (403)<p>&#62; CSRF verification failed. Request aborted.<p>They should've checked that cookie exists. Or, better, not rely on cookies.
评论 #2655254 未加载
troyk将近 14 年前
Could that be a booger on the 1 key (numeric keypad)?
abofh将近 14 年前
Meh, it killed an hour or two that needed to suffer.
leon_将近 14 年前
&#62; Are you ready to get out of credit card debt? &#62; ReadyForZero is a free online financial tool that lets you track your credit card debt ...<p>what is this? some kind of a sick SEO experiment? flagged for spam.
评论 #2654841 未加载