How can i solve this problem using stacks or queues?
i cant be able to get any algorithm.
Find the greater element
use linear search.
take 1st element as max.
compare with others.
if find other element greater than 1st than update max with element.