In doing this,the time complexity increases a lot .Can you explain a bit
Allocating 2d array using dynamic memory
@vivan.singh Dynamic memory allocation takes comparatively more time that static memory allocation. This is because dynamic memory allocation involves two steps… one is to store the pointer variable in the stack memory area… other step is to reserve some space the heap memory for the array. So accessing elements from dynamic array, you need to move to the address in heap memory(which is stored in pointer variable) making it an indirect process. So this is a bit time consuming.