Snapper_001's blog

By Snapper_001, history, 22 months 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?
»
22 months ago, # |
  Vote: I like it +8 Vote: I do not like it