10 additional monthly gift articles to share
The art of the deal.
。关于这个话题,夫子提供了深入分析
Sam Altman would like to remind you that humans use a lot of energy, too
思路:先对 nums2 用单调栈求每个元素的下一个更大值,存入 Map 缓存;再遍历 nums1 直接查 Map 得结果。时间复杂度 O(len1 + len2)。
专注于提供最新行业资讯与深度分析报道
· 王芳 · 来源:user资讯
10 additional monthly gift articles to share
The art of the deal.
。关于这个话题,夫子提供了深入分析
Sam Altman would like to remind you that humans use a lot of energy, too
思路:先对 nums2 用单调栈求每个元素的下一个更大值,存入 Map 缓存;再遍历 nums1 直接查 Map 得结果。时间复杂度 O(len1 + len2)。