Grokking the Coding Interview: Patterns for Coding Questions
Vote

0% completed

​

Solution: Merge Similar Items

.....

.....

.....

Like the course? Get enrolled and start learning!
A

Anonymous

· 2 years ago

I think it should be detailed in python there exists no such pattern unless we create the class ourselves.

Because the python solution starts us off with defaultdict and not collections.OrderedDict which implies we need to sort regardless of which structure we use?

Show 1 reply
A

Anonymous

· 3 years ago

The problem description says

"Combine these arrays such that if an item appears in both, its values are summed up."

Isn't it rather the "weights" that are summed up ? That's what the examples show.

It's not the first confusing problem description that I come across.

Show 1 reply

Reading Progress

0%


Vote for new content