Computer Algorithms:
To write a computer algorithm: * You have to tell the computer, step by step, exactly what you want it to do. The computer then “executes" the program, following each step to accomplish the end goal. * Computers Sort many lists… Here are three different algorithms that are used in sorting: * Bin sort * Merge sort * Quicksort * Bucket sort, or bin sort, is a sorting algorithm that works by separating an array into a number of buckets.
Bucket/Bin Sort works as follows: * Set up an array of initially empty "buckets". * Scatter: Go over the original array, putting each object in its bucket. Pick the best interval. * Sort each non-empty bucket. * Gather: Visit the buckets in order and put all elements back into the original array.
Merge Sort: * Merge sort is a ”divide and conquer algorithm” that was invented by John von Neumann in 1945.
A merge sort works as follows: * Divide the unsorted list into n sublists, each containing 1 element (a list of 1 element is considered sorted). * Repeatedly merge sublists to produce new sublists until there is only 1 sublist remaining. This will be the sorted list.
Quicksort: * Quicksort is a divide and conquer algorithm. * Quicksort first divides a large list into two smaller sub-lists. Quicksort can then sort the sub-lists.
FLOWCHARTS: * A flowchart is a diagram representing logic in which a combination of steps is to be performed. * It consists of labeled geometrical symbols that are interconnected to provide a pictorial representation of data processing. * To