Why two different execution times?

When you allocate memory on the heap with the new keyword, and never delete it. I’m not aware of other instances.

2 Likes

We don’t always read/understand concepts which are going to be asked in interviews. Some out of the box thinking also helps. Also, this thread is so informative. Thanks to everyone

1 Like

You never know , if any hiring guy asks you what would you do at that time?

1 Like

Thanks @aneee004 for the reply!

1 Like