Examples include women being invited for a mammogram to look for breast cancer or the at-home bowel cancer test posted to the home of everyone over the age of 50, every two years.
思路:先对 nums2 用单调栈求每个元素的下一个更大值,存入 Map 缓存;再遍历 nums1 直接查 Map 得结果。时间复杂度 O(len1 + len2)。
,推荐阅读旺商聊官方下载获取更多信息
for (let num of nums1) {
一边是价格赶超大城市的蛋糕、米面、咖啡,另一边是月薪两三千、理货员岗位都要抢破头。