Advertisement
Guest User

Untitled

a guest
Feb 18th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.28 KB | None | 0 0
  1. map<int, size_t> count;
  2.         for(int i = 0; i < inputString.size(); i++) count[inputString[i]]++;
  3.         for(auto &e:count) {
  4.             if(e.first != 97+j) return false;
  5.             j++;
  6.             if(temp < e.second) return false;
  7.             temp = e.second;
  8.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement