8000 flipped min heap sort by landfillbaby · Pull Request #6 · MusicTheorist/ArrayVisualizer · GitHub
[go: up one dir, main page]

Skip to content

flipped min heap sort#6

Merged
MusicTheorist merged 1 commit intoMusicTheorist:masterfrom
landfillbaby:master
May 30, 2020
Merged

flipped min heap sort#6
MusicTheorist merged 1 commit intoMusicTheorist:masterfrom
landfillbaby:master

Conversation

@landfillbaby
Copy link

like min heap sort but doesn't need the flip at the end due to doing everything in reverse
might have off by 1 errors, needs testing, could also be rewritten for optimization probably
i would have tested it myself but my hard drive died a few says ago :(

@landfillbaby landfillbaby changed the title start work on flipped min heap sort flipped min heap sort (needs testing) May 25, 2020
@landfillbaby landfillbaby marked this pull request as ready for review May 27, 2020 04:25
@landfillbaby
Copy link
Author
landfillbaby commented May 27, 2020

alright, i tested it in beanshell on my phone and it should work fine :)
there's probably still room for optimization though, like changing the way loops work instead of just subtracting all the reads and writes from (length - 1)

@landfillbaby landfillbaby changed the title flipped min heap sort (needs testing) flipped min heap sort May 27, 2020
@GenericCherrySwitch
Copy link

I attempted to add it, and when i went to go compile it, there's errors saying "error: cannot fin 8000 d symbol" and it's mostly just from punctuation marks.
image
image

@landfillbaby
Copy link
Author
landfillbaby commented May 27, 2020

oops! forgot to import templates.Sort! should be fixed now. that's what i get for using beanshell lol

@GenericCherrySwitch
Copy link

This is the only error that appeared now. Is it any progress?
image

@landfillbaby
Copy link
Author
landfillbaby commented May 27, 2020

i really have no idea where that error came from. ecj (eclipse compiler for java) says it's fine. i don't have access to real javac so i can't test it myself

@landfillbaby
Copy link
Author
landfillbaby commented May 29, 2020

hey i've just thought. would it be better to just replace the existing MinHeapSort with this? i could modify templates.HeapSorting instead of adding a new file? obviously i'd leave MaxHeapSort effectively unchanged
edit: turns out there's almost no point in even having a template anymore after the changes, due to the sheer amount of isMax conditinals. could simply replace Min with this and then merge Max with the template?

@MusicTheorist MusicTheorist merged commit 1df1839 into MusicTheorist:master May 30, 2020
@MusicTheorist MusicTheorist added documentation Improvements or additions to documentation enhancement New feature or request fixed Reported bug was fixed labels Jun 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
53B5

Labels

documentation Improvements or additions to documentation enhancement New feature or request fixed Reported bug was fixed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

0