find next higher element present in each array