commit e75c75096a018b55167fc92cd5a90776ba746b2e
parent 91a262d7df141e950c4d233015922d6806688169
Author: Amit Dutta <mail@amit.is-a.dev>
Date: Sat, 20 Jun 2026 20:58:00 +0530
Delete semester_2/Algorithms directory
Diffstat:
8 files changed, 0 insertions(+), 197 deletions(-)
diff --git a/semester_2/Algorithms/algo_01.md b/semester_2/Algorithms/algo_01.md
@@ -1,24 +0,0 @@
-# algo_01
-
-### Problem Statement
-
-> Write an algorithm to insert a node at the beginning.
-
-## Algorithm
-```
-procedure insert_begin(head)
-begin
- ptr ← get_node();
- print("Enter the value");
- read(val);
- info(ptr) ← val;
- next(ptr) ← NULL;
- if(head = NULL)
- head ← ptr;
- else
- next(ptr) ← head;
- head ← ptr;
- endif
- return(head);
-end procedure
-```-
\ No newline at end of file
diff --git a/semester_2/Algorithms/algo_02.md b/semester_2/Algorithms/algo_02.md
@@ -1,20 +0,0 @@
-# algo_02
-
-### Problem Statement
-
-> Write an algorithm to delete the first node of the list.
-
-## Algorithm
-```
-procedure delete_firstNode(head)
-begin
- if(head = NULL)
- write("List is empty, Deletion is not possible.");
- else
- p ← head ;
- head ← next(p);
- delete(p);
- endif
- return(head);
-end procedure
-```-
\ No newline at end of file
diff --git a/semester_2/Algorithms/algo_03.md b/semester_2/Algorithms/algo_03.md
@@ -1,21 +0,0 @@
-# algo_03
-
-### Problem Statement
-
-> Write an algorithm to traverse a singly linked list.
-
-## Algorithm
-```
-procedure traverce(head)
-begin
- if(head = NULL)
- write("List is empty");
- else
- ptr ← head;
- while(ptr ≠ NULL)
- write(info(ptr));
- ptr ← next(ptr);
- end while
- end if
-end procedure
-```-
\ No newline at end of file
diff --git a/semester_2/Algorithms/algo_04.md b/semester_2/Algorithms/algo_04.md
@@ -1,23 +0,0 @@
-# algo_04
-
-### Problem Statement
-
-> Write an algorithm to count number of nodes in a singly linked list.
-
-## Algorithm
-```
-procedure count(head)
-begin
- count = 0;
- if(head = NULL)
- write(count);
- else
- ptr ← head;
- while(ptr ≠ NULL)
- count ← count + 1;
- ptr ← next(ptr);
- end while
- write(count);
- endif
-end procedure
-```-
\ No newline at end of file
diff --git a/semester_2/Algorithms/algo_05.md b/semester_2/Algorithms/algo_05.md
@@ -1,26 +0,0 @@
-# algo_05
-
-### Problem Statement
-
-> Write an algorithm to insert a node at the end of the list.
-
-## Algorithm
-```
-procedure insertEnd(head)
-begin
- nptr ← getnode();
- write("Enter info: ");
- read(val);
- info(nptr) ← val;
- if(head = NULL)
- head ← nptr;
- else
- ptr ← head;
- while(next(ptr) ≠ NULL)
- ptr ← next(ptr);
- end while
- next(ptr) ← nptr;
- endif
- return(head);
-end procedure
-```-
\ No newline at end of file
diff --git a/semester_2/Algorithms/algo_06.md b/semester_2/Algorithms/algo_06.md
@@ -1,28 +0,0 @@
-# algo_06
-
-### Problem Statement
-
-> Write an algorithm to delete the last node of the list.
-
-## Algorithm
-```
-procedure deletelastnode(head)
-begin
- if(head = NULL)
- write("List is empty, deletion not possible.");
- else if(next(head) = NULL)
- ptr ← head;
- head ← next(ptr);
- delete(ptr);
- else
- ptr ← head;
- while(next(ptr) ≠ NULL)
- prev ← ptr;
- ptr ← next(ptr);
- end while
- delete(ptr);
- next(prev) ← NULL;
- endif
- return(head);
-end procedure
-```-
\ No newline at end of file
diff --git a/semester_2/Algorithms/algo_07.md b/semester_2/Algorithms/algo_07.md
@@ -1,22 +0,0 @@
-# algo_07
-
-### Problem Statement
-
-> Write an algorithm to search an element from a linked list.
-
-## Algorithm
-```
-procedure search(head, key)
-begin
- isFound ← false;
- ptr ← head;
- while(ptr ≠ NULL)
- if(info(ptr) = key)
- isFound ← true;
- break;
- endif
- ptr ← next(ptr);
- end while
- return(isFound);
-end procedure
-```-
\ No newline at end of file
diff --git a/semester_2/Algorithms/algo_08.md b/semester_2/Algorithms/algo_08.md
@@ -1,25 +0,0 @@
-# algo_08
-
-### Problem Statement
-
-> Write an algorithm to find max element from the list.
-
-## Algorithm
-```
-procedure findMax(head)
-begin
- if(head = NULL)
- write("List is empty.");
- else
- ptr ← head;
- max ← info(ptr);
- while(ptr ≠ NULL)
- if(max < info(ptr))
- max ← info(ptr);
- endif
- ptr ← next(ptr);
- end while
- return(max);
- endif
-end procedure
-```-
\ No newline at end of file