Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
yankjenets
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
5 ms
·
1.
▲
by
yankjenets
3y ago
It's a second semester freshman course for CMU CS undergrads.
2.
▲
by
yankjenets
3y ago
Ah ok, understood. I would argue that is still not a convenient lie of "a branch is a pointer to a commit". Rather, the rebase command is changing what the branch is pointing to, and git tries to make that clear. After that rebase
3.
▲
by
yankjenets
3y ago
By "remove a commit" do you mean rebase A to point at its previous commit, HEAD~1? A commit SHA represents the entire DAG up until that point, not a given changeset. So in your example, branch B is still a pointer to a commit, and
4.
▲
by
yankjenets
3y ago
Isn't that an offer, not a threat? Apollo is fully allowed to make things difficult by complaining on social media that he thinks the pricing is unfair. What is illegal or even unethical about that?
5.
▲
by
yankjenets
3y ago
I listened to the audio as well. Can you please explain how you think Spez interpreted the threat? He thinks that Apollo is threatening to blast them on social media? Slander him? Break his legs? Murder him?
6.
▲
by
yankjenets
6y ago
Because the answer should be an obvious "no it is not guaranteed to be sorted". If the answer is yes the input is sorted, then that context should have been given in the original prompt as it is a completely different question.
7.
▲
by
yankjenets
6y ago
And if you had a magical oracle that spat out the two numbers if a solution exists, and otherwise told you no solution exists, you would have an O(1) solution. Just because you can ask a question whose answer makes a drastic difference betw
8.
▲
by
yankjenets
6y ago
My point was more it is just a different problem. Another "clarifying question" in this vein would be "if there is a valid answer, will they be in index 0 and 1 of the list?" I'm obviously being somewhat facetious h
9.
▲
by
yankjenets
6y ago
> can I multiply a number by itself This is a great clarifying question. Ambiguous from the prompt. > what shall I return if there are multiple numbers meeting the criteria This is a decent clarifying question. I think it is better ex
10.
▲
by
yankjenets
7y ago
Optimize for readability above everything else. Almost all of these examples I'd argue would be better suited for something like .map(). Little point in being overly cute, and if you are working with arrays large enough such that doing
11.
▲
by
yankjenets
8y ago
There's a phrase for that. "not permanent."