Sorting and Search Algorithm User Manual
Program Name: Ruibin Ling Sorting and Search Algorithms
Version: 1.0
Developer: Ruibin Ling
Course Code: ICS4U
Teacher: Mr. Manyanga
Key Features
1. Bubble Sort Algorithm
- Sorts arrays in ascending or descending order
- Shows comparison swapping process
- Displays each swap
2. Selection Sort Algorithm
- Sorts arrays in ascending or descending order
- Finds minimum/maximum element in each sort
- Shows sorting process
- Displays swapping operations and confirms correct positioning
3. Linear Search Algorithm
- Searches for specific target value in array
- Shows search process
- Displays position where target is found
How to Use
1. Launch the Program
Run the Python file to start the sorting and search system
2. Main Menu Options
Select an action:
● Sort an array (Bubble Sort) (1) - Use bubble sort algorithm
● Sort an array (Selection Sort) (2) - Use selection sort algorithm
● Search in an array (Linear Search) (3) - Find specific number
● Exit (4) - Close the program
3. Using Bubble Sort
1. Enter array elements separated by spaces (e.g., "5 2 8 1 9")
2. Choose sorting order:
○ Enter "a" for ascending order (smallest to largest)
○ Enter "d" for descending order (largest to smallest)
3. View step-by-step sorting process:
○ Initial array display
○ Each swap with swapping operations
○ Final sorted result
4. Using Selection Sort
1. Enter array elements separated by spaces
2. Choose sorting order:
○ Enter "a" for ascending order
○ Enter "d" for descending order
3. View sorting process:
○ Finding smallest/largest element in each pass
○ Position swapping or confirmation
○ Final sorted array
5. Using Linear Search
1. Enter array elements separated by spaces
2. Enter the target number to search for
3. View search process:
○ Step-by-step element checking
○ Position indication when found
○ Confirmation if target not found
6. Program Flow
● After each operation, choose to continue or exit
● Enter "y" to perform another operation
● Enter "n" to exit the program
● Invalid inputs will prompt for re-entry