Age | Commit message (Collapse) | Author |
|
It's not too bad since I worked it out in Java. I didn't use recursive
functions at all to avoid stack overflow issues. Instead, I worked it
out using loop with stacks and queues. Lots of fun!
|
|
I used C++'s priority_queue (queue.h) and C++'s own pair data structure.
Unlike Python and Java's similar data structure, C++'s priority_queue
pops in reverse order, so I had to negate the value, and negate back
when adding them to vectors. Cool use of pair. Fun stuff :)
|
|
Implementation isn't difficult since I worked the algo out in Java and
Python already. I tried to use VS Code to write this but in the end
decided to stick with Eclipse. Doing this in VS Code may not be worth
the investment.
|