because POSIX has a function for creating a stack)
�@�܂��������s�̉͏����C�݂ɂ́A�O�ς������ʂ̐����݂����A�u�f�������e�B�v�Ƃ����ʂ̐Ƃ��Ēm�����Ă����B�����������̔����ɂ����āA�f�������e�B�Ƃ��Ď��W�����W�{�̒��ɁA���s�X���Y���������Ă����\���������B�ߋ��ɂ������܂Ő��Ő��Ǝv���ꂽ���A�V�z���u�������v���������Ⴊ�����u�����Ɏ������ۂ������܂��N�����\���������v�ƍ����Ȋw�����ق݂͂Ă����B,这一点在同城约会中也有详细论述
思路:先对 nums2 用单调栈求每个元素的下一个更大值,存入 Map 缓存;再遍历 nums1 直接查 Map 得结果。时间复杂度 O(len1 + len2)。。关于这个话题,heLLoword翻译官方下载提供了深入分析
Nature, Published online: 27 February 2026; doi:10.1038/d41586-026-00621-w