Snapper_001's blog

By Snapper_001, history, 3 years ago, In English

static bool comp(string a ,string b){ return a.size()<=b.size(); }

I used this in leetcode But this gives Error "terminate called after throwing an instance of 'std::length_error' "

after changing it to --> a.size()<b.size() this works How this works????

  • Vote: I like it
  • -2
  • Vote: I do not like it

| Write comment?
»
3 years ago, # |
  Vote: I like it +8 Vote: I do not like it