Next Greatest Element Gfg