few test cases not passing
Painters code doubt
you can’t write s=a[n-1]
as array is not sorted
you have to take max element of array
i hope this help
if you have more doubts regarding this feel free to ask
if your doubt is resolved mark it as resolved from your doubt section inside your course