Is this approach is correct?

So in this basically we have to iterate over the array and check with current value of array and if next element is greater than the current value than we say that next element is max and return the value of maximum value ??

Confuse in this line :
Take N more inputs and store that in an array.

Please clear it…

hello @piyushkumar999999

they are telling that first u will be given size of the array i,e N . and
then next line will contain N values that will the array elements.

use one variable for storing maximum . first intiialsie it with 1st element of array.
and then iterate the array elements . if current element is greater than the stored maxx then update ur max

Sir I miss one test case in this help me out !! https://ide.codingblocks.com/s/354084

@piyushkumar999999
image

here it should be <

Where it should be ’ < ’ ?? if i put this in if condition i get zero answer i guess …please explain sir

@piyushkumar999999
check ur updated code here ( comment mentioned)->

Hey @piyushkumar999999
What is the issue in it?