Searching in Data Structures Presentation
Searching in Data Structures Presentation
Structures
D.Kusumanjali
FROM IT DEPARTEMENT ¼
ROLL NO: 11
Introduction
• • Searching is the process of finding a specific
element in a data structure.
• • It plays a crucial role in optimizing
performance in software systems.
• • Efficient searching techniques improve
speed and resource utilization.
Types of Searching
• • Linear Search
• • Binary Search
• • Hashing
Linear Search
• • Searches each element one by one.
• • No need for sorted data.
• • Time Complexity: O(n)
• • Simple but inefficient for large datasets.
Binary Search
• • Works on sorted data only.
• • Divides the dataset in half each step.
• • Time Complexity: O(log n)
• • Efficient for large sorted datasets.
Hashing
• • Uses hash functions to compute index.
• • Offers near constant time search: O(1) on
average.
• • Handles collisions via chaining or open
addressing.
• • Ideal for key-value pair lookups.
Comparison of Searching Techniques
• Technique | Time Complexity | Use Case
• ------------- | ----------------| --------
• Linear Search | O(n) | Unsorted lists
• Binary Search | O(log n) | Sorted arrays
• Hashing | O(1) avg case | Fast access
using keys
Applications in Real Life
• • Search engines use optimized searching
algorithms.
• • Databases implement indexing using binary
or hash search.
• • Operating systems and compilers use symbol
table searching.
Advantages and Limitations
• • Linear Search: Simple but slow.
• • Binary Search: Fast but needs sorted data.
• • Hashing: Very fast, but needs extra memory
and may have collisions.
Recent Trends
• • Big Data and distributed systems demand
highly scalable search.
• • AI-based search optimization in modern
applications.
• • Usage of hybrid algorithms for improved
performance.
Conclusion
• • Choosing the right search algorithm is key to
performance.
• • Binary Search and Hashing offer speed for
specific cases.
• • Understanding data and context is crucial.
Thank You
• Questions?
• Feel free to reach out!