I get to use a leetcode question algorithm at work.

I finally used an algorithm from the question Course Schedule at work.

I had a requirement where I need to execute some actions one after another in an orchestration system. I created a DAG of the actions and used topological sorting to find out which action is to be executed next (after an action is completed). This algorithm sits at the core of a very important microservice.
Some senior members has suggested threads and futures and stuff, but this is much more elegant and scalable.

People often thinks that all this grinding leetcode is all useless after you get the job but apparently thats not true.

Comments (4)