Tower of Hanoi Problem Iteratively

It is difficult to implement this problem Iteratively, What approach should i follow to store all the disks Is I need to make an array to store the N disks?

@Vikaspal yes this problem is meant to be solved recursively so try to do it that way only.

okay @Ishitagambhir I will do it

@Vikaspal let me know if you are stuck :slight_smile: please mark the doubt as resolved if you dont have any further queries

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.