Searching is an algorithm that allows user to retrieve the data according to search criteria. It is an algorithm for finding an item with specified properties among a collection of items which are coded into a computer program, that look for clues to return what is wanted.
Example search the value from database system, search the keyword from search engine.
|17 Linear search || Linear search is a method to find the particular item in an array. It takes search item and compare each item from array until it finds. The linear search performs nonsorted items in array. |
|18 Binary search || Binary search is a method to find a particular item in the sorted array. In each step, the algorithm divides the array equally and match the middle item. If the key match, the search returns the index. If the key is less then the middle item, search left subarray. Else search right subarray. |
|19 Binary search tree || A binary search tree is a binary tree (contains only two nodes). The left subtree is less than or equal to the parent node and right subtree is greater than or equal to the parent node. |
|20 Red-Black tree || Red-Black tree is a self-balanced binary search tree with color, which can be either red or black. The color information ensures an approximately balanced tree by constraining how nodes are colored from any path from the root to the leaf. |
|21 Dictionary lookup || Write a program to look up the item in the hash tables. Value can be duplicate and keys should not duplicate. |
|22 File indexing || An indexed file is a computer file with an index that allows easy random access to any record given its file key. |