WigglyPenguin
WigglyPenguin

Developers who are good with DSA, please share scenarios where you used it to optimise something related to personal/professional projects.

11mo ago
Find out if you are being paid fairly.Download Grapevine
SwirlySushi
SwirlySushi

Difficult to explain but I'll try. I had an API which takes a list of complex objects, each object can be a primitive object or refer to one or more other objects in the list, thus a composite object. The processing logic needed the list to be in such a way that if composite object B refers to object A then object A needs to be before B in the list. This orde was not possible to implement on the caller side, meaning caller will pass list in any order. To solve this, I used topological sorting i.e is dependency resolution to sort the list before passing to the processor. I was just a fresher with 6 month of experience under the belt, and this solution helped me draw attention of my teammates and manager to my knowledge and started gaining respect.

BouncyMarshmallow
BouncyMarshmallow

Great anecdote, thanks for sharing, I searched topological sort and learned something new

Discover more
Curated from across