PragmaEdge interview question

MAX and MiN element in ans array to write the code and run.