Comments
+29

It will be an array of size 26 to store frequency of characters but in this problem, there is no update so we can do prefix sum

int ceil2(int a, int b) { int c=a/b; if(a % b ! =0) c++; return }

See the link for better understanding Click here...