1 / 7
Feb 2011

i looked aat my code again and could not understand where i am going out of bound could you please help me out ....

Read the problem constraints. You have made an assumption about them that is causing you to read outside the array.

only constraint i see is of
1-string not more then 80 char and strings contain only lowercase letters and underscores(_)
2-k (1-100)

i have made assumption about a1,a2,a3 that is to be equal to size of string(in the case when all char belong to same group ) ,and i am keeping check on it by 3 int p,q,r so that it is in the range..

Suggested Topics

Topic Category Replies Views Activity
C and C++ 0 14 7d

Want to read more? Browse other topics in C and C++ or view latest topics.