Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ========== Introductory Session =================
- Primitive Data structure
- Int, Float, Char, Double, Pointer
- Non primitive data types
- Linear(Sequential) - Arrays, lists [Single LL, Double LL, Circular LL],stacks queues
- Non Linear(Random) - Trees[Binary, Binary search trees], Graphs
- **** Operations that can be performed in data structure
- **** Common Operations
- Searching
- Sorting
- Insertion
- Deletion
- Updation
- Arrays
- Advantages - Similar data type elements, Access elements with index, used to implement stacks and queues
- Disadvantages - Static Memory Allocation (specify size during compile), Wastes memory, Insertion and Deletion is expensive
- Session 1 =====================================
- Linked list
- // Define the structure for a singly linked list node
- struct Node {
- int data;
- struct Node* next;
- };
- struct Node* newNode = (struct Node*)malloc(sizeof(struct Node));
- struct Node {
- int data;
- struct Node* next;
- } *new,*head,*tail; # *new,*head,*tail - another method of directly assigning variables
- program for linked list
- Session 2 ==============================================
- How to insert elements to linked list
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement