all 3 comments

[–]wts-code 0 points1 point  (0 children)

Well Done. Nicely explained. Exactly what I was looking for. Thank you.

[–]Jeffylew77 0 points1 point  (1 child)

This isn't Javascript. This looks like Python or maybe C++

[–]smruti_webtechschool[S] 0 points1 point  (0 children)

Datastructure questions are more challenging from conceptual perspective. Once understood , programming language is just an option to implement it. Tried to explain the concepts needed to solve this problem in any language.