11-05-2011, 05:07 PM
In linked list discussed in lectures, every node contained an integer because in Node class we have defined variable object of type int.
If you want to make a linked list in which every node contains an array then define array instead of int in Node class.
Of course it will be useful, for example you want to create a linked list of fruits, then to store fruit names you can use character array i.e; every node in the linked list will contain an array and that array will hold the fruit name.
If you want to make a linked list in which every node contains an array then define array instead of int in Node class.
Of course it will be useful, for example you want to create a linked list of fruits, then to store fruit names you can use character array i.e; every node in the linked list will contain an array and that array will hold the fruit name.
0300-9520262
Get solution in 24 hour |cpmputer & internet
mileys81:[SIZE="4"][SIZE="3"]....[/SIZE][/SIZE]
