|
![](/i/fill.gif) |
On 02/12/2012 04:21 PM, Warp wrote:
> In C++ I would probably write it like:
>
> std::vector<int> foobar(const std::string& s)
> {
> std::istringstream is(s);
> std::vector<int> result;
> int value;
> while(is>> value) result.push_back(value);
> std::sort(result.begin(), result.end());
> return result;
> }
...and in much less than 25 minutes. Clearly you're better than any of
the people we've interviewed. (But we knew that.)
It's also conspicuous that, unlike any of the people we interviewed,
you're currently employed. :-P
Post a reply to this message
|
![](/i/fill.gif) |