Please help to find error

Modified Code

there is no need to make cs array one variable can do it as well

also make freq array of type ll