Skip to content

Commit

Permalink
496
Browse files Browse the repository at this point in the history
  • Loading branch information
isinsuarici committed Apr 24, 2022
1 parent 598a1bd commit b8a00fb
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions E_496_NextGreaterElementI.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
class Solution:
def nextGreaterElement(self, nums1: List[int], nums2: List[int]) -> List[int]:
def find(num):
for x in nums2[nums2.index(num):]:
if x>num:
return x
return -1

return list(map(find,nums1))

0 comments on commit b8a00fb

Please sign in to comment.