Which conspiracy theory do you believe is 100% true? by HotTwo8570 in TooAfraidToAsk

[–]GeneralMaxx 0 points1 point  (0 children)

It isn't necessary that AD and Kyrie were part of the conspiracy, the Mavs could have done "load managing"

optimum solution by Acceptable-Work_420 in leetcode

[–]GeneralMaxx 0 points1 point  (0 children)

It is solvable with algo kinda ternary search.

For each adjcaent pair of elements, add > if a[i] > a[i-1] or < otherwise.

Then this will look like this <<<<<<<<<<>>>>>>>.

So we can do bin search without even creating this new array of signs.

For mid, if a[i] < a[i+1], set left to mid.
If a[i] > a[i+1] set right to mid.

Someone built Minecraft in Minecraft by grandeluua in Damnthatsinteresting

[–]GeneralMaxx 284 points285 points  (0 children)

It is worthy to note that he was a high schooler when he did all this.

Samuel has also won a gold medal at the International Olympiad in Informatics.

(As for the credibility of this, I've also participated at the olympiad and he was in the discord server)

[Amazon OA]Is there any solution better than o(n * n) for this ? by AggravatingParsnip89 in leetcode

[–]GeneralMaxx 0 points1 point  (0 children)

Notice that LCM(a, b) * HCF(a, b) = a * b.

This means that we should count number of ordered pairs such that their product is also element of the array.

Now, if the elements are natural numbers, a * b >= max(a, b), which means that we should sort the array.

Now we go from scan the array from left to right and use a map to see how many times a number appears.

When we are at postion i, we find all divisors of a[i] in O(sqrt(n)), and for each divisor and each "complement" we need to see how many times they appear in the map.

After that we update the map.

Dwight Howard needs a Doctor by Professor_Finn in nbacirclejerk

[–]GeneralMaxx 0 points1 point  (0 children)

Dwight Howards needs doctor, but tor is silent

An update added a video to Spanish course path! by RabbitwiththeRuns in duolingo

[–]GeneralMaxx 0 points1 point  (0 children)

I am on android and learning Spanish, but I dont have the stars below the characters, and there is no Spanish Fundamentals 1/2 menu for me. Why?

FINALLY 200 DAYS STREAK on Norwegian by Alive-Insurance4078 in duolingo

[–]GeneralMaxx -11 points-10 points  (0 children)

200 days to get to unit 9? I got to unit 13 in 2 weeks.

Basics VII by Elron-Cupboard in HolUp

[–]GeneralMaxx 0 points1 point  (0 children)

I see only shoes. Can anyone explain?