How do I store linked list datas into an array?
Answer / mahesh
If you have the predetermined length of the number of nodes
in the linked list then you could have went for arrays
initialy only .
But still if you want to store the complete linked list
into an array i think dynamic arrays are best option.
Implementation : -
Loop through the linked list till enad and copy the data
members in the linked list except the NEXT or PREV pointers
into the array.
Is This Answer Correct ? | 9 Yes | 1 No |
swap prog
Write a simple encryption program using string function which apply the substitution method.
write a program to sort 'n' elemnts using bubble sort
1. Write a program using one dimensional array that calculates the sum and average of the five input values from the keyboard and prints the calculated sum and average.
readers and writers problem
Given 1 to n random number, find top 10 maximum numbers and explain the time complexity of the algorithm.
output for printf("printf");
Faster Computers Suppose you have a computer that requires 1 minute to solve problem instances of size 1000. What instance sizes can be run in 1 minute if you buy a new computer that runs 1000 times faster than the old one, assuming the following time complexities T(n) for our algorithm? (a) T(n) = O(n). (b) T(n) = O(n3). (c) T(n) = O(10n).
How can I Draw an ellipse in 3d space and color it by using graph3d?
how to take time as input in the format (12:02:13) from user so that controls remains between these columns?
3. Program to find the Sum of give series. a. (1)+(1+2)+(1+2+3)+(1+2+3+4)+……………………………….. b. 1/1+1/9+1/25+1/49+……………...
program to find the magic square using array