Algorithm Writing Functions for STL

I have std::setone that has typepoint

struct point
{
  int x;
  int y;
  int z;
};

Suppose I want to perform three different operations for each variable in the ie set

  • Find the smallest number of variables x.
  • Get missing elements from y variables using setting difference.
  • Get the product from all variables z.

At this point, should I use the three predefined alorithmic functions in the sequence or should I write my own algorithm that would perform all three operations by iterating over the set once?

+3
source share
2 answers

, 5% , 95%. , , , , . - .

+8

3 . , .

- .

+2

Source: https://habr.com/ru/post/1764116/


All Articles