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.
@dray92 , Hi, I am just wondering why set max = stack.peek().curMax when the choice ==2. I am kind of confused that part. According to the description, you just pop the top of your stack, right? Can you please explain the situation. Sorry about my stupidity.
Maximum Element
You are viewing a single comment's thread. Return to all comments →
@dray92 , Hi, I am just wondering why set max = stack.peek().curMax when the choice ==2. I am kind of confused that part. According to the description, you just pop the top of your stack, right? Can you please explain the situation. Sorry about my stupidity.