Python Tricks Learnt from Coding Data Structures & Algorithm Questions

This story is a result of spending two years of intensive coding of questions on Data Structures and Algorithm questions on platforms like Lintcode and Leetcodes. I had always publish on solutions to thorny questions that I encountered so as to alleviate the pain of the next learner.

I will take a different tack here and focused on the efficient Python techniques picked up. These are usually non-obvious tricks through much searching of techniques to be more efficient in writing less code and be more Pythonic