Create a structure to hold the data. The numeric data can be in an array that is part of the structure. Then you assign the structure as the data part of your linked list. There are singly linked lists (each node has a pointer to the next node) and doubly linked lists (each node has a pointer to the next as well as the previous node). Basically, each node has 2 or 3 elements. For a singly linked lists there are two. One element is a pointer to the data, the other is the pointer to the next node in the list.
//3 structs linked together in a linked list
_______ _______ _______
|data#1 | |data#2 | |data#3 |
idea is to have an instance of a struct that has data and a pointer which points to another instance of a struct that has different data and points to another instance of a struct with different data and so on 'till last struct which points to NULL so when you go through the linked list you should check if struck points to NULL in which case that is the last element(struct) of a linked list
Need some help with this Array. I am trying to get the sum of the even numbers and the sum of the odd numbers using a for each loop. I know the answers to what I am trying to achive are sum of even = 84 and the sum of ...
I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...