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: 
If you want people to give you the code they wont.
In terms of this particular problem with the list you have given you can either
1) sort it then start from the begining to find the smallest integer
2) just run through every number

You can keep a temporary variable to keep the current lowest. Then step through and compare it to this variable. If it is lower then set that value to the lowest value.

Once you have finished stepping through them all you just return the value of that temporary variable.
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.