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 |
write a program to calculate the radius for a quadratic equation use modular programming(function abitraction)hint use quadratic function
1 Answers ICAN, Jomo Kenyatta University,
A string of charaters were given. Find the highest occurance of a character and display that character. eg.: INPUT: AEGBCNAVNEETGUPTAEDAGPE OUTPUT: E
Perform the functionality of 2-D array through 1-D array and in it the functions to be performed were: (1) Display the array in 2-D format (2) Display a particular element (3) Display a particular row (4) Display a particular column
Write a function- oriented to convert the input dollar(s) into its equivalent peso. Assume that one dollar is equivalent to 51.60
Write an algorithm that receives a string and reverses it.
solve the problem in the programming language C++"if a five digit number is input through the keyboard.Write a program to calculate the sum of its digits(hint: use the modulus operator)
write a program that creates a sequenced array of numbers starting with 1 and alternately add 1 and then 2 to create the text number in the series , as shown below. 1,33,4,6,7,9,............147,148,150 Then , using a binary search , searches the array 100 times using randomly generated targets in the range of 1 to 150
write a program that can LOCATE and INSERT elements in array using c++ programming languages.
how to write a program that opens a file and display in reverse order?
write a function that reverse the elements of an array in place.The function must accept only one pointer value and return void.
Write a program using two-dimensional arrays that determines the highest and lowest of the 12 input values. Example: Enter 12 numbers: 13 15 20 13 35 40 16 18 20 18 20 14 highest: 40 lowest: 13
Min-Max Write an algorithm that finds both the smallest and largest numbers in a list of n numbers and with complexity T(n) is at most about (1.5)n comparisons.
10 Answers ABC, College School Exams Tests, ITC Infotech, Kyambogo University, Qatar University,