Linked List Searching Sorting Notes
Linked List Searching Sorting Notes
1. Linked Lists
Linked Lists are linear data structures where elements (nodes) are connected using pointers.
Types:
2. Doubly Linked List: Each node points to both the next and previous nodes.
Key Advantages:
class Node {
public:
int data;
Node* next;
class SinglyLinkedList {
private:
Node* head;
public:
};
2. Searching Algorithms
1. Linear Search:
2. Binary Search:
- Divides the search space into halves and searches in the sorted array.
3. Sorting Algorithms
2. Selection Sort:
3. Insertion Sort:
4. Quick Sort:
5. Merge Sort:
with insertion, deletion, traversal, sorting (Bubble Sort), and searching (Linear and Binary).
Refer to the full code in the study material for implementation details.