Question: I can't seem to get my head around the off-line minimum algo. Can someone explain it to me more?
Possibly with pseudo-code in a "near-code" fashion.
Say, for example, that I have the following sequence: 

```
"5","4","6","E","1","7","E","E","3","2"

```

**What are the steps to return the smallest integer in the whole set.** I understand the problem but I don't seem to find a way to code it.

Regards

Answer: 
Because I had nothing better to do, an example implementation leveraging the power of the Standard Library:

```
#include <iostream>
#include <set>
#include <vector>

std::vector<int> offline_minima(const std::vector<int>& input)
{
  std::vector<int> result;
  std::multiset<int> numbers; // handles duplicate input like in 4,4,5,E,4,6,E,E
  for(int i : input)
  {
    if(i == 'E') // We need to extract the minimum
    {
      if(numbers.empty())
        throw -42; // shouldn't happen with valid input
      result.push_back(*(std::begin(numbers))); // store the minimum number
      numbers.erase(std::begin(numbers)); // remove the minimum number from our sorted numbers
    }
    else
      numbers.insert(i); // store the new number in the sorted set numbers
  }
  return result;
}

int main()
{
  const std::vector<int> input{ 5, 4, 6, 'E', 1, 7, 'E', 'E', 3, 2 };
  const auto result = offline_minima(input);

  for(int i : result)
    std::cout << i << '\n';
}

```

[Live demo here](http://coliru.stacked-crooked.com/a/633662dcba4d7618).
Note I misuse the fact that characters like `'E'` can be converted to an `int` and thus if the array contains the value `69` this will be misinterpreted as an `E`. But the question isn't about input validation/processing so I left that as a featbugre.
Here are some calls from the standard library which do what you asked for. They are probably not the most efficient ones.

```
std::vector<std::string> v{"5","4","6","E","1","7","E","E","3","2"};
std::vector<std::string> r{"1","2","3","4","5","6","7","8","9"};

std::sort(v.begin(), v.end());

//remove all elements which are not numbers
std::vector<std::string> v_numbers;
std::set_intersection(v.begin(), v.end(), r.begin(), r.end()
                    , std::back_inserter(v_numbers));

//find minimum element
std::string result = *std::min_element(v_numbers.begin(), v_numbers.end());
std::cout<<result<<std::endl;

```

This prints `1`.

[DEMO](http://ideone.com/e.js/sfZ8h4)

---

**EDIT:** Note that in the current form, it will work only for single-digit numbers. If that isn't sufficient, either remove all `"E"` in front of the `set_intersection` -- if `"E"` is your only letter. Or generate a string-vector `r` which ends with a larger number than `"9"`. Or do something completely different.