Sir what mistake i am making in code
@spagire4 In comb function, at the end, when you are transfering elements from temp to main array, index range for temp will be different not s to e, it will be from ‘0’ to ‘k’-1 for temp and ‘s’ to ‘e’ for main array.
Hope it solves your doubt.