Make your first PR! ~ A beginner friendly repository made specifically for open source beginners. Add any program under any language (it can be anything from a hello-world program to a complex data structure algorithm) or update the existing one. Just make sure you add the program under the correct language directory. Happy coding
This C++ program uses the bubble sort algorithm to sort an array of integers. The function bubbleSort takes an array and its length as parameters. It iterates through the array multiple times, comparing each pair of adjacent elements and swapping them if they are in the wrong order. This process continues until the array is sorted.
The function printArray is used to print the array elements.
In the main function, an array of integers is initialized, and its length is calculated. The bubbleSort function is then called to sort the array, and the sorted array is printed using the printArray function.
The Following Output for the code will be :
Sorted array:
11 12 22 25 34 64 90
Pull Request
Related issue
Fixes #
What does this PR do?
...
PR checklist
Please check if your PR fulfills the following requirements:
[x] Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)?
[x] Have you read the contributing guidelines?
[x] Have you made sure that the title is accurate and descriptive of the changes?
Thank you so much for contributing to Meilisearch!
This C++ program uses the bubble sort algorithm to sort an array of integers. The function bubbleSort takes an array and its length as parameters. It iterates through the array multiple times, comparing each pair of adjacent elements and swapping them if they are in the wrong order. This process continues until the array is sorted.
The function printArray is used to print the array elements.
In the main function, an array of integers is initialized, and its length is calculated. The bubbleSort function is then called to sort the array, and the sorted array is printed using the printArray function.
The Following Output for the code will be :
Sorted array: 11 12 22 25 34 64 90
Pull Request
Related issue
Fixes #
What does this PR do?
PR checklist
Please check if your PR fulfills the following requirements:
Thank you so much for contributing to Meilisearch!