We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
But, isn't this solution actually changing the original stack. Shouldn't the integrity of stack be preserved for further uses in general.
I feel its not a good practice to solve problem like this.
Please tell me if I am going wrong way;
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Maximum Element
You are viewing a single comment's thread. Return to all comments →
But, isn't this solution actually changing the original stack. Shouldn't the integrity of stack be preserved for further uses in general. I feel its not a good practice to solve problem like this. Please tell me if I am going wrong way;