Unit II: String Matching Algorithms and Computational Geometry - CSE408 Design and Analysis of Algorithms | B.Tech CSE Notes PDF | FineNotes4U
Unit II: String Matching Algorithms and Computational Geometry ⭐Sequential Search and Brute-Force String Matching 1. Sequential Search 1.1 Introduction to Sequential Search Definition: Sequential search is a simple searching algorithm where each element in a list or array is checked one by one until the target value is found or the end of the list is reached. Concept: Start from the first element and compare it with the target value. If a match is found, return the position. If no match is found, move to the next element . Repeat until the target is found or the list ends. 1.2 Uses of Sequential Search Unsorted Data Search : Works well when the list is not sorted , unlike Binary Search which requires sorted data. Small Data Sets : Suitable when the number of elements is small (as performance is O(n)). Finding Duplicates : Used when searching for multiple occurrences of a value in a list. Linked Lists & Memory-based Data Structures : When elements aren't stored in contiguo...