Urgent help please


  • 0
    M

    Am I not understanding this question properly? Input: nums1 = [4,1,2], nums2 = [1,3,4,2]. So I understand that I look at nums1[0] and then i look for nums1[0] in nums2. If i find nums1[0] then i look at the integer on the right of nums2. But why is it that nums1 = [1,3,5,2,4], nums2 = [6,5,4,3,2,1,7] gives me [7,7,7,7,7]? If i follow the logic, nums1[1] == nums2[3], and the nums2[4] is not greater than nums2[3] so i return -1. Please advise.


  • 0
    M

    I understand it already. The question was phrased very weirdly.


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.