Create a program that will implement the four sorting algorithms:
Bubble Sort
Insertion Sort
Selection Sort
Merge Sort
Additionally- the program must have the ability to run any of the four algorithms on an unsorted array.
Please fix the following input errors: