Question 1 200-500 words per discussion and avoid plagiarism.a. Write down the algorithm for linear search.b. Write a program that uses linear search to search for the 5th value using c++.c. Discuss 2 advantages of using linear search over binary search.d. Discuss 2 advantages of using binary search over linear search.e. Write down the algorithm for binary search.f. Using binary search, write a program in c++ that will search though any given nth numberof values in an array.Question 2 200-500 words per discussion and avoid plagiarism.a. Discuss the following sorting algorithms and state applications of them where each ismost suitable.i. Bubble Sortii. Insertion Sortiii. Selection Sortiv. Merge Sortv. Shell Sortvi. Quick Sortb. Choose 10 distinct numbers of your choice at random and perform the entire searchdescribed above on them.Question 3 An artificial intelligence system was designed to forecast the financial trading market andpredict changea. Produce the results for the depth search from the graph above. eg A to B should be (A, B)b. Produce the values for depth search and breadth search. eg A to B should be (A, B)c. Produce the adjacency matrix of the graph above.d. Write a program in c++ using two for loops to perform the breadth search.e. Write a program in c++ using two for loops to perform the depth search.
Question 1 200-500 words per discussion and avoid plagiarism.
a. Write down the
b. Write a program that uses linear search to search for the 5th value using c++.
c. Discuss 2 advantages of using linear search over binary search.
d. Discuss 2 advantages of using binary search over linear search.
e. Write down the algorithm for binary search.
f. Using binary search, write a program in c++ that will search though any given nth number
of values in an array.
Question 2 200-500 words per discussion and avoid plagiarism.
a. Discuss the following sorting algorithms and state applications of them where each is
most suitable.
i. Bubble Sort
ii. Insertion Sort
iii. Selection Sort
iv. Merge Sort
v. Shell Sort
vi. Quick Sort
b. Choose 10 distinct numbers of your choice at random and perform the entire search
described above on them.
Question 3
An
predict change
a. Produce the results for the depth search from the graph above. eg A to B should be (A, B)
b. Produce the values for depth search and breadth search. eg A to B should be (A, B)
c. Produce the adjacency matrix of the graph above.
d. Write a program in c++ using two for loops to perform the breadth search.
e. Write a program in c++ using two for loops to perform the depth search.
Step by step
Solved in 3 steps with 2 images