From 78c3e6259e6b0dc66d5ef7bc5c94e96112e38ba2 Mon Sep 17 00:00:00 2001 From: Het Patel <124852522+Hunterdii@users.noreply.github.com> Date: Sat, 18 May 2024 06:25:03 +0530 Subject: [PATCH] Create May-18.py Python Solved GFG POTD --- May 2024 GFG SOLUTION/May-18.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 May 2024 GFG SOLUTION/May-18.py diff --git a/May 2024 GFG SOLUTION/May-18.py b/May 2024 GFG SOLUTION/May-18.py new file mode 100644 index 00000000..243dc99f --- /dev/null +++ b/May 2024 GFG SOLUTION/May-18.py @@ -0,0 +1,21 @@ +#User function Template for python3 +from typing import List + +class Solution: + def findPeakElement(self, a: List[int]) -> int: + return max(a) + +#{ + # Driver Code Starts +#Initial Template for Python 3 + +if __name__ == '__main__': + T = int(input()) + for i in range(T): + n = int(input()) + a = list(map(int, input().split())) + ob = Solution() + ans = ob.findPeakElement(a) + print(ans) + +# } Driver Code Ends