While running the code, it takes a lot of time, or sometimes it doesn’t run. Due to this bug i have submit the code and not able to figure out the mistakes.