Not Too Hard

Limits: 1s, 512 MB

Showmik is very popular nowadays. Junior coders always seek help from him. He also wants them to improve their skills. So for them he has given a problem which is not too easy and again not too hard. He is generating a tree which has the following properties: 1. Each node takes 1 second to be created. 2. Each node will have m child nodes. m will be equal to (current level + 1). 3. Each node will be marked with a number starting from left. Number starts with 1.


This is a companion discussion topic for the original entry at https://toph.co/p/not-too-hard