Programming Language: C++ You have been hired by Google to work on their YouTube videos search team. Every YouTube video has a unique ID and those IDs are in unsorted order. As a software engineer, you are required to make a YouTube search engine which works for very user. Create a test engine that only holds seven YouTube IDs. Prompt for and get from the user the seven IDs and store them in an
Programming Language: C++
You have been hired by Google to work on their YouTube videos search team. Every YouTube video has a unique ID and those IDs are in unsorted order. As a software engineer, you are required to make a YouTube search engine which works for very user. Create a test engine that only holds seven YouTube IDs. Prompt for and get from the user the seven IDs and store them in an integer array. Then sort and print the array using the insertion sort
In addition to function main, define the following two functions:
void insertion_sort(int arr[], int arr_size)
int binary_search(int sort_arr[], int size_array, int search_value)
binary_seacrh returns the index of search value. If the value does not exist in the array, it returns -1,
See Arrays – linear and binary searches sample application on Canvas.
Sample input:
Enter the number of in Youtube(assign the value 7): 8
Enter the file size (assign the value 7): 7
Enter the id each youtube_video:
12
7
100
78
105
67
32
Output
The sorted data is:
7
12
32
67
78
100
105
Then Input/output
Enter your value to search in the array:
32
32 is found in 2 th position of this sorted list
Enter your value to search in the array:
11
11 is not found in this sorted list
Enter your value to search in the array:
Enter your value to search in the array:
-999
Process returned 0 (0x0) execution time : 128.104 s
Press any key to continue.

Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 4 images









