We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- C
- Arrays and Strings
- Dynamic Array in C
- Discussions
Dynamic Array in C
Dynamic Array in C
Sort by
recency
|
410 Discussions
|
Please Login in order to post a comment
Simplest solution: Prepare required storages then Perform insert (with realloc if necessary)
Code Solution ------------------------>
int main() ........ { int total_number_of_shelves; scanf("%d", &total_number_of_shelves);
The problem is not clear about implementation.
Here is my explanation.
Simpler, isn't it?
Here is Dynamic Array in C solution - https://programmingoneonone.com/hackerrank-dynamic-array-in-c-solution.html
Just wanted to share this cause I found this easier
include
include
int main() { int shelfbook[100][100], count=0, count2=0; int total_number_of_shelves; scanf("%d", &total_number_of_shelves);
}
In the assigment they missed to tell that you have to allocate the page matrice and the book array :)