Amazon interview question

How to implement Nary Tree