1. Compare two different sorting algorithms. 2 .Explain, in your own words point
ID: 644491 • Letter: 1
Question
1. Compare two different sorting algorithms.
2 .Explain, in your own words pointers. Write a simple program to illustrate.
3 .Two programs each read in numbers and find the largest. One reads input from the keyboard, the other from a file. Explain how these two programs are different and illustrate with C++ code snippets to illustrate.
4 . Explain, in your own words pass by reference, write a short program to illustrate.
5.Write a short program that uses two parallel arrays. Explain the code.
6 .Write a program that will use loops to generate the table shown below. The numbers are to be formatted as shown with 2 decimal places.
N N+0 N+.25 N+.5 N+.75
0 0.00 0.25 0.50 0.75
1 1.00 1.25 1.50 1.75
2 2.00 2.25 2.50 2.75
3 3.00 3.25 3.50 3.75
Explanation / Answer
1)
A. Bubble Sort [Best: O (n), Worst: O (N^2)] Starting on the left, compare adjacent items and keep "bubbling" the larger one to the right (it
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.