Valarray is a class similar to vector but is efficient than vector if it comes to mathematical operations. It provides many element-wise operations, various forms of generalized subscript operators, slicing and indirect access. In some mathematical operations, valarrays are more efficient than vector operations. Some of the APIs provided by valarray class are: apply(the function that performs the operation on every element) This API applies manipulation on the given arguments to all the array elements. valarray<int> arr = {1,2,3,4,5,6}; arr.apply([] (int x){return x = x+ 5;}); The above code increments every element by 5 sum() This API performs the sum of all elements in the given array valarray<int> arr = {1,2,3,4,5}; arr.sum(); The above code sums up all the elements of the array which is 15. min() This API finds out the smallest element in the array. max() This API finds out the largest element in the array. valarray<int> arr = {1,2,...