Where my code is wrong?
@goelsparsh277 when you do this
the array is initialised like {-1, 0, 0, 0, 0…}
so you need to iterate over all the elements to initialise it with -1. You can use the memset() function as well.
@goelsparsh277 when you do this
the array is initialised like {-1, 0, 0, 0, 0…}
so you need to iterate over all the elements to initialise it with -1. You can use the memset() function as well.