Search Sort Algorithms and Data Structures PDF
Search Sort Algorithms and Data Structures PDF
indefinitely
Associative Array Can use integers or have mapped "keys", languages like PHP
and JavaScript support this type of structure and is the actual Queue
type. FIFO - First in First Out
Array
Looks at the array and decides which side to look for the search When should you think about the data structure?
term Search & Sort Algorithms and Data Structures
How can you identify the data structure to use?
Starts with a sorted array
Linear Search
start off with a random array of things, keep splitting them until
Goes through each element you have 1 item in each array, merge them in order
O(n log(n))
Slowest when the search term is last O(n) Merge Sort
Predictable since the size of the array is most important and will
Fastest when the search term is first O(1) determine the speed of the sort
For database engines, this is used quite often due to its stable
properties (stable means that the order of same rank elements
Sort will stay the same)
This algorithm is used when it is almost assured that the data will
be randomly ordered.