This week in data structures we took are linked list program and broke it up into separate functions in separate files and had them pass nodes between them and create a menu for the program that could call each function on demand we then compiled them linked them together and where evaluated on them .In discrete we worked on are set program and are naive sort program I found the linked list project was a very good refresher on funtions and passing parameters between functions such as nodes and pointers
This week in discrete we starting writing a set program that takes in members than outputs them in set notation now we are modifying and improving that program to be menu driving and perform operations such as union, intersection and difference. in data we are finishing are modular menu driven doubly linked list and we have also started on a linked list based stack program.
This is a sample format for a dated entry. Please substitute the actual date for “Month Day, Year”, and duplicate the level 4 heading to make additional entries.
As an aid, feel free to use the following questions to help you generate content for your entries:
Remember that 4 is just the minimum number of entries. Feel free to have more.
This is a sample format for a dated entry. Please substitute the actual date for “Month Day, Year”, and duplicate the level 4 heading to make additional entries.
As an aid, feel free to use the following questions to help you generate content for your entries:
Remember that 4 is just the minimum number of entries. Feel free to have more.
stack push operation
The push operation adds a new element to the top of the stack (FILO)First in Last Out
List any sites, books, or sources utilized when researching information on this topic. (Remove any filler text).
* http://www.cplusplus.com/reference/stl/stack/push/
* http://en.wikipedia.org/wiki/Stack_(abstract_data_type)
array vs. linked list (pros/cons)
An array is a simpler, easier format for multiple value storage. You do not need to go threw the list in an array, you can use that element of the array. Linked lists have no benefits.
Demonstration of the indicated keyword.
If you wish to aid your definition with a code sample, you can do so by using a wiki code block, an example follows:
/* * Sample code block */ #include <stdio.h> int main() { return(0); }
Alternatively (or additionally), if you want to demonstrate something on the command-line, you can do so as follows:
lab46:~$ cd src lab46:~/src$ gcc -o hello hello.c lab46:~/src$ ./hello Hello, World! lab46:~/src$
proper subset
A subset is a set of members that when compaired with another set of members regardless of the sizes of either set it shares some but not all of the same members. a Proper subset is when the two sets of members are a subset but not equal
List any sites, books, or sources utilized when researching information on this topic. (Remove any filler text).
venn diagrams
A pictorial way to compare two things and also show what they have in common, often shown with two circles overlaying each other.
Demonstration of the indicated keyword.
If you wish to aid your definition with a code sample, you can do so by using a wiki code block, an example follows:
http://lab46.corning-cc.edu/~rthatch2/image.png
int main() {
return(0);
} </code>
Alternatively (or additionally), if you want to demonstrate something on the command-line, you can do so as follows:
lab46:~$ cd src lab46:~/src$ gcc -o hello hello.c lab46:~/src$ ./hello Hello, World! lab46:~/src$
Is an an array dynamic ?
I know from class and compile errors its not and thats what makes a linked list useful
No memory needs to be allocated for the array so it has to be declared with a size and type
write a program that uses a variable in the array decliration like so : int myArray[size]
It actually compiled because its a logic error not a syntax error but the program did not work
Based on the data collected: my hypothesis was correct but that outcome is not what I expected I for some reason expected compiler errors
although would be nice due to the way the c compiler allocates memory arrays must be declared with a size