Task 1
At an interview I was asked how to by a given vector of integers build resulting vector containing the products of all the elements except current. Below I provided my solution in C++:
#include <vector>
#include <iostream>
using V = std::vector<int>;
V func(const V& v)
{
V result;
result.resize(v.size());
int product = 1;
for (size_t pos = 0; pos != v.size(); ++pos)
{
result[pos] = product;
int a = v[pos];
product *= a;
}





