Cos 211 Lecture Note
Cos 211 Lecture Note
Programming Time
Execution Time
Number of Comparisons
Memory Utilization
Computational Complexity
Types of Sorting Techniques:
Internal Sorting: Internal sorting method is used when small
amount of data has to be sorted. In this method , the data
to be sorted is stored in the main memory (RAM).Internal
sorting method can access records randomly. EX: Bubble
Sort, Insertion Sort, Selection Sort, Shell sort, Quick Sort, Radix
Sort, Heap Sort etc.
External Sorting: Extern al sorting method is used when large
amount of data has to be sorted. In this method, the data
to be sorted is stored in the main memory as well as in the
secondary memory such as disk. External sorting methods
an access records only in a sequential order. Ex: Merge
Sort, Multi way Mage Sort.
SEARCHING TECHNIQUES
Searching is the process of finding some particular
element in the list. If the element is present in the list, then
the process is called successful and the process returns
the location of that element, otherwise the search is
called unsuccessful.
There are two popular search methods that are widely
used in order to search some item into the list. However,
choice of the algorithm depends upon the arrangement
of the list.
Linear Search
Binary Search
LINEAR SEARCH / SEQUENTIAL SEARCH