Algorithim challenge (like advent of code)


Submit answers in the collection!

how i have this

My solution is in the List Utilities library. :~)

It's only the first day :slight_smile: and @pumpkinhead should add his project to the collection.

but how do i put it in the collection?

I think next time you should tell us how merge sort works so I don't have to find out myself.

no,this is for you to find it out yourself.If you didn't see this challenge maybe you never searched for merge sort bc you use bubble sort!

but that doesn't answer my question on how to put it in the collection, i press "Add to collection" and my desired collection doesn't show up. There is nothing on the collection page.

i only use bubble sort because it's the simplest sorting algorithm. if i wanted a faster sorting algorithm i would use quick sort. and i suggested for you to tell us how merge sort works because i was going to get the same answer everytime when i search up "how to merge sort," and you gave me no option but to. so i could just search up merge sort psuedocode and then copy the code into snap and that's not really programming that's just compiling basically

I like mergesort better than quicksort because mergesort takes guaranteed O(n lg n) time, whereas quicksort is just average O(n lg n) with a worst case of O(n²). Also because it lends itself to linked lists better than quicksort, which is best for contiguous arrays.

Because you need @18001767679 to add you as an editor to their collection. :slight_smile:

But you can't just copy it in today's challenge!
https://snap.berkeley.edu/collection?user=18001767679&collection=Second%20day
@bromagosa oh.
How to add people?

Click at the plus sign at the "editors" section of the collection page:

imatge

Then type their username :slight_smile:

But I don't see that sign.

Is the collection yours?

Yes.it is.
I can't click it because the a tag width is 0.
I forced it to click and it worked!


@bromagosa

Yes it is. I checked as if I was you, and the sign is there:

imatge

Are you not seeing it? :man_shrugging:

What's 0*24?

Can I use the JavaScript blocks from the "Catch errors" library?

yes and the error block too.
My version uses them(except and raise)
Congradulations!
You used the same algorithm as my program
You need a warp block.https://repl.it/@18001767679/expect#main.py(better not open this if you aren't pumpkinhead or it will spoil the challenge)

I don't think it's the same program, for example yours removes all whitespace while mines just ignores it. Also, you can just run my program in turbo mode so I don't need a warp block.

Wait are we still talking about mergesort?