Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Algorithms and Data structure Please code with c language LABORATORY WORK No4. Searching algorithms Purpose of the laboratory work The purpose of laboratory work No4.
Algorithms and Data structure
LABORATORY WORK No4. Searching algorithms Purpose of the laboratory work The purpose of laboratory work No4. " Searching algorithms" is the assimilation of theoretical material and the acquisition of practical skills to solve the problem of finding a given category of elements using different algorithms of the binary search method in two-dimensional arrays. Formulation of the problem 1. Write a program for solving the search problem in a two-dimensional array (matrix) by binary search. The search algorithm is specified by the task variant. 2. Take the dimensions of the matrix m and n in the range from 7 to 10. 3. When testing the program it is necessary to select the following input sets of initial values of the matrix so that it is possible to easily track the correctness of the search and this correctness would be tested for all possible cases. Smaller matrices may be used for testing purposes. Contents of the report 1. General problem statement and tasks for a specific option. 2. Program text, input data. 3. Tests for debugging the program and the results obtained for them on the computer. Variant N: 10 The matrix of real numbers A[m, n] is given. Identify the presence among all elements of the matrix of a given real number X and its location (coordinates) by the 2 method of binary search (Algorithm No2), if the elements of each row are ordered separately in ascending order Please code with c language
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started