摘要:
Given two arrays, write a function to compute their intersection. Example 1: Example 2: Input: nums1 = [4,9,5], nums2 = [9,4,9,8,4] Output: [9,4] Exam 阅读全文
摘要:
Design a max stack that supports push, pop, top, peekMax and popMax. Example 1: Note: 基本思路同 153. Min Stack,用两个stack 注意popMax()的时候要先把stack中的元素pop出来,直到找 阅读全文