1.LC 139 word Break

BONUS:

将vector数值存储在unordered_set中去重

vector<string> vs;

unordered_set<int> us(vs.begin(),vs.end());

vector通过值找元素只能用find(vector.begin(),vector.end(),val)!=vector.end();

map set可以通过find count来查找map.find(val)/count(val)

 

posted on 2020-02-25 19:12  黑暗尽头的超音速炬火  阅读(110)  评论(0)    收藏  举报