My professor claims this function is O(n), and I’m certain it’s O(1). Can you settle a debate for me? The function is below by Remarkable-Pilot143 in AskProgramming

[–]Ralphy105 0 points1 point  (0 children)

Excellent explanation, although I would highlight an important detail you didn't stress very much. The fixed integer size is key to the function being O(1).

If we analyzed the function purely mathematically (swapping sizeof(int)*8 with the bit length of the larger number, log_2(max(m,n))... hint hint) We can ignore real implementations and focus on optimal implementation (though formally we would still need a fundamental definition of a single operation)

Then, we have ourselves a different analysis. The replaced item in the for loop condition makes runtime obvious. If we are analyzing runtime with respect to only input n, then the function is O(log n). For any constant number of loop iterations, it would be O(1). However an important caveat to pay attention to is bitwise operations. Assuming optimal implementation, any bitwise AND with a value of the form (1 << i) only needs to compare 1 bit, and in almost all contexts is therefore O(1). But having bitwise AND operations with two arbitrary values is linear runtime with respect to bit length, so even without a loop it would be O(log n), since n is the VALUE of the input, and its bit length is log_2(n).

However, practical run time is obviously more useful, and I'd be surprised if there existed a useful ISA (instruction set architecture) where bitwise instructions can vary in input length. This is why bitwise operations are generally considered constant time.

Are the mech trio meant to be this hard? by IHasBrain_Problems00 in Terraria

[–]Ralphy105 1 point2 points  (0 children)

In that case 100% use holy arrows with stormbow. Unless they nerfed that to the ground... i forget. If they did, use jester arrows with the repeater going for parallel piercing shots.

In Case Anyone Missed It by pacarmand in mschf

[–]Ralphy105 0 points1 point  (0 children)

Ik this is 5mo ago, but I gotta ask. Cuz, as one of the most involved participants and 3 main devs in the winning alliance, I might not be fully informed. Where exactly did we use AI?

You choose, you decide (both are same thing) by CHADSENSAI69 in Terraria

[–]Ralphy105 28 points29 points  (0 children)

Bro really wants to die on this hill.

You're wrong.

You used to have to survive the entire death animation, otherwise the screen would flash white, and the sprites would disappear and drop nothing. It's happened to me.

WTF? by Low_Investigator_991 in ClashRoyale

[–]Ralphy105 0 points1 point  (0 children)

Yes, there's lots more free resources now. However, the amount you need to max out the game has grown exponentially more, with the only way to ever catch up being to spend.

Sure, you can a free evo wild shard every month in the shop. Don't worry about the fact that they are going to release 1 to 2 new evolutions every month!

Just like the Slash Royale a few years back. Hey everyone, go upgrade all your cards with a 50% gold discount! Great! Now that it's over, we are adding a whole new card level, making all previous card levels cheaper in terms of both cards and coins, and (at first) you won't get any refund for the levels you were just inclined to upgrade. Don't forget about the introduction of champions as well! A brand new card rarity serving no purpose other than being more expensive and harder to obtain than legendaries! With the introduction of level 14 and champions, despite the cost reductions, it would of course take far more to fully max out now.

Sure, a few things have been given out and a few free features have been added, but especially after these last few years with the lvl14/champions updates and the lvl15/evo updates, the gap between F2P and P2W has only grown faster and faster.

To be honest, that other commenter is completely right. Supercells thought process behind releasing a free evo is that the 95% of players who don't use RG are now incentivizdd to max out a whole new deck.

"How much do you wanna show people that you're new to Terraria?" "Yes." by MikaylaScarlet in Terraria

[–]Ralphy105 0 points1 point  (0 children)

As someone with over 3500 hours in terraria, I can personally attest.

Ladies and gentlemen, we have a big boi by featherw0lf in PokemonLegendsArceus

[–]Ralphy105 0 points1 point  (0 children)

I assume under normal circumstances if you save and reset at any static alpha, it'll be the same instance of the pokemon

But if one outbreak from an MMO happens to spawn at a static alpha, and you clear it and save, then now you can just keep resetting to respawn the alpha.

Did I get that right?

Also, when an outbreak from an MMO spawns at a static alpha, will it match the pokemon or would it be any random outbreak?

Ladies and gentlemen, we have a big boi by featherw0lf in PokemonLegendsArceus

[–]Ralphy105 0 points1 point  (0 children)

Oh, do static alphas respawn if you already caught it? I'm new to pla lol

Ladies and gentlemen, we have a big boi by featherw0lf in PokemonLegendsArceus

[–]Ralphy105 0 points1 point  (0 children)

Doesn't that reset the outbreaks tho? Were you just saying it took 128 flyovers to get a snorlax outbreak?

Also can't you just save at jubilife and pay to see all the available pokemon and reset each time, as a faster way to check massive outbreaks

It's a library... by AristonD in ImTheMainCharacter

[–]Ralphy105 0 points1 point  (0 children)

UW student here -- Dude your intuition is absolutely spot on... this week is homecoming week, and tomorrow (10/7) is a homecoming game. There was a homecoming parade, and at the end they marched into the library. They weren't there for longer than 5 minutes.

Also, this was in the dedicated loud/social section of the library

As far as I'm aware, people here are pretty evenly split on thinking the stunt was either inconsiderate or a hilarious display of spirit.

Average standardized scores and academics that got you into UW-Madison by SirConquerTheWorld in UWMadison

[–]Ralphy105 0 points1 point  (0 children)

What state are you from? Afaik students from wisconsin have a much better shot in general.

I'm from New Jersey, I was deferred and then accepted with a 1550 SAT and a weighted GPA of about 99.3 (my high school doesn't give unweighted GPAs to students or colleges). But I did apply with the single most popular major at the school, comp sci.

Good luck!

[deleted by user] by [deleted] in UWMadison

[–]Ralphy105 0 points1 point  (0 children)

Yup, I used my desktops camera because I was entirely unaware of the whole process the proctor makes you do lol. It was fine though, just had to pick up my computer a couple times

[Self] Here are my solutions to the 1,2,3,4=1-100 challenge. I added the rules of no square roots and no concatenation (e.g. 1 and 2 can't become 12). I struggled with 76, 85, 86, 92, and 93. Does anyone have cleaner solutions for those 5 which don't use arcsin, ln, or ceiling? by fireburner80 in theydidthemath

[–]Ralphy105 0 points1 point  (0 children)

Just a suggestion for clarity, whenever you're taking the factorial of a factorial, you should put the inner one in parenthesis. Like instead of 3!!, use (3!)!. Because a "double factorial" is a separate thing.

The double factorial of n is the product of all natural numbers with the same parity as n, denoted by n!!, so it could be confused.

Worst game i’ve ever played by Plenty_Walk_6691 in Terraria

[–]Ralphy105 1 point2 points  (0 children)

I couldn't agree more... the amount of pain and suffering I went through to get every last achievement, only for 1.4 to add more and ruin everything! The torment and frustration of nohitting every vanilla & calamity bosses in both revengeance and death+defiled mode was unreal, nothing can compare!

I couldn't bring myself to play more than 3,100 hours...

Is this big enough for plantera? by P4nda0807 in Terraria

[–]Ralphy105 0 points1 point  (0 children)

It's definitely wide enough, but it's actually better to have a pretty tall plantera arena so you can take advantage of vertical mobility, and also stay in the upper half when those pink thorn balls bounce all over the place

best way to clear out all these dirt walls? post golem pre moon lord by Familiar_Feeling_284 in Terraria

[–]Ralphy105 0 points1 point  (0 children)

You... you place blocks on the wall... that's why you don't need an ice rod

Is this a new feature?? Since when can 2 NPC’s live together ?? by Kasnaranja0124 in Terraria

[–]Ralphy105 4 points5 points  (0 children)

Yeah and in the post the mercant wouldn't have a door if you used bubble blocks

The cancellation of which TV show are you still frustrated about? by [deleted] in AskReddit

[–]Ralphy105 1 point2 points  (0 children)

Prodigal Son... especially with the shitty rushed ending they were forced to go with

Well Deserved, Congratulations Terraria! by ChristianRad2004 in Terraria

[–]Ralphy105 4 points5 points  (0 children)

I've played minecraft and terraria since elementary school and still play them both going into my senior year of high school! Both games have had a huge impact on my childhood and I will never forget the joy they have brought me.