Bloomberg LP Interview Report
- 0of 0 votes
Answersstd::vector<int> items;
- bigbear September 02, 2009
Referring to the sample code above, how do you remove all elements from the items
collections that are greater than 50?
a. items.erase(std::remove_if(items.begin(), items.end(), std::bind2nd(std::greater<int>(), 50)), items.end());
b. std::remove_if(items.begin(), items.end(), std::greater<int>(50));
c. items.erase(std::remove_if(items.begin(), items.end(), std::bindlst(std::less_equal<int>(), 50)), items.end());
d. items.remove_if(items.begin(), items.end(), std::bind2nd(std::greater<int>(), 50)));
e. items.remove_if_greater(items.begin(), items.end(), 50);| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer C++
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.