wall.cpp: In function 'void buildWall(int, int, int*, int*, int*, int*, int*)':
wall.cpp:16:34: error: 'max' was not declared in this scope
finalHeight[x] = max(finalHeight[i], height[i]);
^~~
wall.cpp:16:34: note: suggested alternative:
In file included from /usr/include/c++/7/algorithm:62:0,
from wall.cpp:4:
/usr/include/c++/7/bits/stl_algo.h:3468:5: note: 'std::max'
max(initializer_list<_Tp> __l, _Compare __comp)
^~~
wall.cpp:18:34: error: 'min' was not declared in this scope
finalHeight[x] = min(finalHeight[i], height[i]);
^~~
wall.cpp:18:34: note: suggested alternative:
In file included from /usr/include/c++/7/algorithm:62:0,
from wall.cpp:4:
/usr/include/c++/7/bits/stl_algo.h:3456:5: note: 'std::min'
min(initializer_list<_Tp> __l, _Compare __comp)
^~~