- What is a Data Structure & Types of Data Structures
- What is an Algorithm & It's Characteristics
- Asymptotic Notations
- What is Space Complexity
- Array in Data Structure
- Algorithm for Insertion in Array
- Sparse Matrix
- Introduction to a Linked List
- Algorithm to Insert a Node at the End of the Linked list
- Algorithm to Insert a Node at the Front of the Linked List
- Algorithm to Delete a Node from Linked list
- Circular Linked List
- Algorithm to Insert a Node in the Circular Linked list
- Algorithm to Delete a Node from the Circular Linked list
- Doubly Linked List
- Algorithm to Insert a Node at the End of the Doubly Linked list
- Algorithm to Delete a Node from the Doubly Linked List
- Stack Data Structure
- Algorithm to convert Infix to Postfix
- Queue Data Structure
- Circular Queue in Data Structure
Algorithm to Delete a Node from the Circular Linked list
Algorithm to delete a
node at the end:
Step 1: IF HEAD = NULL
Write UNDERFLOW
Go to Step 8
[END OF IF]
Step 2: SET TEMP = HEAD
Step 3: Repeat Steps 4 and 5 while TEMP -> NEXT != HEAD
Step 4: SET TEMP1 = TEMP
Step 5: SET TEMP = TEMP -> NEXT
[END OF LOOP]
Step 6: SET TEMP1 -> NEXT = HEAD
Step 7: FREE TEMP
Step 8: EXIT
Algorithm to delete a
node at the front
Step 1: IF HEAD =
NULL
Write UNDERFLOW
Go to Step 8
[END OF IF]
Step 2: SET TEMP
= HEAD
Step 3: Repeat
Step 4 while TEMP → NEXT! = HEAD
Step 4: SET TEMP
= TEMP → next
[END OF LOOP]
Step 5: SET TEMP
→ NEXT = HEAD → NEXT
Step 6: FREE HEAD
Step 7: SET HEAD
= TEMP → NEXT
Step 8: EXIT
Algorithm to delete a
node at the specific position
STEP 1: IF HEAD =
NULL
WRITE UNDERFLOW
GOTO STEP 11
END OF IF
STEP 2: SET TEMP
= HEAD
STEP 3: SET I = 0
STEP 4: REPEAT
STEP 5 TO 8 UNTIL I<LOC
STEP 5: TEMP1 =
TEMP
STEP 6: TEMP =
TEMP → NEXT
STEP 7: IF TEMP =
NULL
WRITE "DESIRED NODE NOT
PRESENT"
GOTO STEP 11
END OF IF
STEP 8: SET I = I+1
END OF LOOP
STEP 9: TEMP1 →
NEXT = TEMP → NEXT
STEP 10: FREE
TEMP
STEP 11: EXIT