Fixed 1 bug and 1 issue
Bug:
Was not returning the right parts of a sum when certain conditions were met.
There were 2 conditions that had to happen to trigger the bug. The first was when
a value currently being added to the list already existed in the stack. The
second condition was that this value was first pushed onto the value zero.
A stack of value zero was not found in the hash so one was created.
Then the value was pushed on the top of 0 and blindly hashed. The
problem was that the top value already existed in the hash and caused a
collision. This was solved by simply traversing the list in reverse order.
Issue:
Duplicate removal should be done in the merge_lists and not in the trim function.