Finding a random seed that solves a LeetCode problem (2023)

mcyc | 98 points

Reminds me of this rock paper scissors bot that has a 59% win rate against other algorithms: https://rpscontest.com/entry/614005

porphyra | a month ago

Haha, this is pretty funny. I immediately thought of Cantor's diagonal argument when I saw the question, but it makes me wonder ā€” how long would it have taken me to solve the problem if I hadn't previously read about Cantor's argument in the context of Turing machines?

Here's a variant: "Given a list of k LeetCode problems sourced from a bag of n unique tricks, generate a new LeetCode problem that utilizes a trick not found in the bag."

I'm being facetious of course, but actually now I have an idea that we could create a bipartite graph mapping tricks to LeetCode problems. From there, given a willingness to memorize n tricks, we can compute the optimal bag of tricks to commit to memory in order to maximize the number of LeetCode problems quickly solvable during an interview, weighted by the probability of each problem's appearance.

Xcelerate | a month ago

The same can be applied to a stock market. I am a big fan of looking into historical data, and I was using WealthLab for quite a while.

One of the funniest things is when you find "strategy" that performs best over one year by making from 50 to 100 deals. But don't get fooled, it's just a random parameters, and when applied to the next year or years, you won't get these results, of course.

So you're getting reliable results only when you can reproduce your success (no matter what it is) consistently.

RomanPushkin | a month ago

Reminds me of LLMs, where the weights are the 'seed' that solves standard benchmark suite.

freediver | a month ago

so when is the last time you used this in your code you write on a day to day basis?

b20000 | a month ago

[dead]

hfjke | a month ago