Quasari

joined 2 years ago
[–] Quasari@programming.dev 0 points 2 years ago (1 children)

I think he means that a 90% drop would be 90 Mbps. This is more like a 7% drop.

[–] Quasari@programming.dev 11 points 2 years ago

It's a contract thing called detrimental reliance. As I understand it, basically you relied on a promise to do something only in the event the promise was upheld then it wasn't. It wouldn't hurt to speak to a lawyer for a consultation. I doubt you'd get the job back, but they could be liable for the damages caused by moving.

[–] Quasari@programming.dev 9 points 2 years ago

Kaycee's mod gives it a fair amount of replay.

[–] Quasari@programming.dev 20 points 2 years ago (1 children)

Hey, I love that they added the effect of his clothes dropping off him the first time he shape-shifts after regaining his shape-shifting abilities.

[–] Quasari@programming.dev 12 points 2 years ago (1 children)

They are laying off people not on strike in response to the strike and blaming those on strike for it.

[–] Quasari@programming.dev 0 points 2 years ago

Why not do both?

[–] Quasari@programming.dev 2 points 2 years ago

functools.cache

That's pretty cool. I haven't dived too deep into python, so I should of looked up the library when you attached the @cache decorator. I learned something.

[–] Quasari@programming.dev 2 points 2 years ago (2 children)

Without memoization, I believe the Fibonacci sequence is O(2^N). It's dependent on how long a sequence of digits is in the input, so your worst case is like O(2^N) if the string is mostly digits and best case being O(N) if there are only 1 or 2 digit sequences.

Someone can correct me if I'm wrong.

[–] Quasari@programming.dev 1 points 2 years ago* (last edited 2 years ago)

So, I also realized its the fibonacci sequence for number of combinations of numbers. All I care about is counting sequential digits, we skip a character after every sequence. We just need to account for if the first character is a number and we are good. I did this in ruby. I didn't really try for anything bonus points wise.

Pastebin because formatting doesn't like & or <

My code also outputs 0 if the sequence itself is invalid(ends on a non-digit character, or has two non-digit characters in a row)

[–] Quasari@programming.dev 0 points 2 years ago* (last edited 2 years ago) (1 children)

I found this one easier than the medium as well. Maybe because I actually know a strategy for this one. Anywho, solution is in JavaScript. It's super ugly as I went for lowest character count, so no declarations, single char variable names, no semicolons, etc...

Basically use a anchor-runner pointer strategy to find a correct substring, I use a stack based solution for checking if the substring is correct. When the stack is empty, the substring is good, thus I record the start of it and its length. If, I get another good point, I just record the highest. If I hit a point where its no longer good, I jump the start to the end of the most recent good substring. Pretty fun.

Formatting screwed mine up, so heres a pastbin

[–] Quasari@programming.dev 7 points 2 years ago

Add to it the gun law was declared unconstitutional by the fifth circuit Court of appeals recently, it's likely the only charges he'll be facing are tax related. It's funny because the gun charge was the only thing holding back his plea deal.

[–] Quasari@programming.dev 16 points 2 years ago

It was 50k doubling each day. So 50k + 100k + 200k for 3 days, if they had let it keep going it would of hurt a lot. This type of fine works.

At 10 days would be 51 million, after 20 would be 52 billion dollars. So, they have a compelling reason to comply with haste.

view more: ‹ prev next ›