Parallel Algorithm for Prefix Min Max in OpenMP and POSIX threads