TAILIEUCHUNG - Lecture Algorithms and data structures: Chapter 2 - Searching

This topic reviews the basic mathematics required in this course: A justification for a mathematical framework, the ceiling and floor functions, L’Hôpital’s rule, logarithms, arithmetic and other polynomial series, geometric series, recurrence relations, weighted averages, combinations. | Review 1 Arrays & Strings Array Array Elements Accessing array elements Declaring an array Initializing an array Two-dimensional Array Array of Structure String Array of Strings Examples Searching Introduction to Searching External and Internal Searching Types of Searching Linear or sequential search Binary Search Algorithms for Linear Search Algorithms for Binary Search 2 Introduction Information retrieval is one of the most important applications of computers We are given a name and are asked for an associated telephone listing We are given an account number and are asked for the transactions occurring in that account We are given an employee name or number and are asked for the employee records 3 Introduction Information retrieval is one of the most important applications of computers We are given a name and are asked for an associated telephone listing We are given an account number and are asked for the transactions occurring in that account We are given an employee name or number and are asked for the employee records 4 Searching is a process of checking and finding an element from a list of elements If we want to find the presence of an element “data” in A, then we have to search for it The search is successful if data does appear in A and unsuccessful otherwise A question you should always ask when selecting a search algorithm is “How fast does the search have to be?” The reason is that, in general, the faster the algorithm is, the more complex it is. Bottom line: you don’t always need to use or should use the fastest algorithm 5 Key In these examples, we are given one piece of information, which we shall call a key We are asked to find a record that contains other information associated with the key We shall allow both the possibility that there is more than one record with the same key and that there is no record with the given key 6 Records and their keys 7 Analysis Searching for the keys that locate records is often the most time-consuming action in a .

TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
8    164    3    22-12-2024
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.