Could someone please explain the approach to the solution?


#1

Comment body goes here.


#2

Check this video link, really nicely explained the concept.Let me know if this was helpful.