Next Greater Element I Leetcode Solution
Problem Statement In this problem, we are given two lists in which first list is subset of second list. For each element of first list, we have to find out next greater element in the second list. Example nums1 = [4,1,2], nums2 = [1,3,4,2] [-1,3,-1] Explanation: for first element of list1 i.e. for 4 there …