CHAPTER 6 Search ☆ Definition of search ☆ Static search table ☆ Dynamic search table Hash table 米 米
❖Definition of search ❖Static search table ❖Dynamic search table ❖Hash table CHAPTER 6 Search
s 1 Definition of search Search table is collection constituted By the same types of data elements (or record), because the elements in the collection has loose relationship to each other, so search table is a facilitating application data structure. Basic operation of search table Search a specific data element in the search table Search the properties of a specific data element 米 Insert a data element into the search table Delete a data element in the search table
Search table is collection constituted By the same types of data elements (or record), because the elements in the collection has loose relationship to each other , so search table is a facilitating application data structure. Basic operation of search table: ▪Search a specific data element in the search table ; ▪Search the properties of a specific data element; ▪Insert a data element into the search table; ▪Delete a data element in the search table §1 Definition of search
The classification of search table Static search table only for querying and searching Dynamic search table In the process of searching in the search table insert the inexistent data elements or remove a pre-existing data elements at the same time. Such table is called dynamic search table
Static search table only for querying and searching。 Dynamic search table In the process of searching in the search table , insert the inexistent data elements or remove a pre-existing data elements at the same time. Such table is called dynamic search table. The classification of search table:
Keyword it is a value of property of a data element (or record) to identify the data element(or record). If keyword can be identified only as a record, said that the " primary keyword. If keyword can identify a number of records, said that the" general keyword
Keyword it is a value of property of a data element (or record) to identify the data element( or record). If keyword can be identified only as a record, said that the “primary keyword." If keyword can identify a number of records, said that the “general keyword
Searching According to a giving value, search the table to return data element whose keyword equal to the value If search table has this data element(or record) then call search successful and return. the entire record or the position of it in the table else call search failed and return. null record or null pointer
According to a giving value, search the table to return a data element whose keyword equal to the value. If search table has this data element(or record) then call ”search successful”, and return:the entire record or the position of it in the table; else call“search failed” ,and return:null record or null pointer. Searching