• + 1 comment

    n is number of sequences so ther might possible more then 2 sequences. In that case you need more array like b[],c[].Max possible size of these arrays are q so there you can also save some memory.