subject

You are given an n by n matrix of distinct integers such that all rows and all columns are increasing. that is, every row read left to right is an increasing sequence of integers and every column read from top to bottom is an increasing sequence of integers. you would like to determine if a given integer k is in the matrix. you can access any entry of the matrix, and it costs one unit of time to compare two different entries of the matrix or to compare an entry with any number of your choice.

come up with a "divide and conquer" algorithm that solves this problem by splitting the matrix into quadrants. explain why your algorithm is correct.

write a recurrence for the running time of this algorithm.

determine the big-o time complexity of this algorithm. for full credit your algorithm should beat the obvious θ(n2) time complexity. for bonus credit, give an o(n) time algorithm

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 22:00
Which of the following statements correctly identifies a problem with sanitization methods? a. methods are not available to remove data ensuring that unauthorized personnel cannot retrieve data.b. even fully incinerated media can offer extractable data.c. personnel can perform sanitization steps improperly.d. stored data is physically etched into the media.
Answers: 1
question
Computers and Technology, 22.06.2019 11:00
How does a policy manual an organization? a. it boost productivity. b. it create awareness in employees about the organization’s values. c. it employees achieve targets. d. it safeguards the organization from liabilities.
Answers: 1
question
Computers and Technology, 22.06.2019 22:30
The qwerty keyboard is the most common layout of keys on a keyboard
Answers: 3
question
Computers and Technology, 23.06.2019 02:50
Define a class named movie. include private fields for the title,year, and name of the director. include three public functions withprototypes void movie: : settitle(cstring); , voidmovie: : setyear(int); , void movie: : setdirector(string); . includeanother function that displays all the information about a movie.write a main() function that declares a movie object namedmyfavoritemovie. set and display the object's fields.this is what i have but know its wrong since it will notcompile: #include#includeusing namespace std; //class declarationclass movie{private: string movietitle ; string movieyear; string directorname; public: void settitle(string title); void setyear(string year); void setdirector(string director); void displayinfo(); }; //class implementationvoid movie: : settitle(string title){ movietitle = title; cout< < "what is the title of themovie? "< > temp; myfavoritemovie.settitle(temp); cout< < "enter movie year"< > temp; myfavoritemovie.setyear(temp); cout< < "enter director'sname"< > temp; myfavoritemovie.setdirector(temp); //display all the data myfavoritemovie.displayinfo(); system("pause"); return 0; this code is not entirely mine someone on cramster edited my firstcode but then i try manipulating the new code and i still get acompile error message : \documents\visual studio 2008\projects\movie\movie\movie.cpp(46) : error c2679: binary '< < ' : no operator found which takes aright-hand operand of type 'std: : string' (or there is no acceptableconversion)c: \program files (x86)\microsoft visual studio9.0\vc\include\ostream(653): could be'std: : basic_ostream< _elem,_traits> & std: : operator< < > (std: : basic_ostream< _elem,_traits> & ,const char *)w
Answers: 1
You know the right answer?
You are given an n by n matrix of distinct integers such that all rows and all columns are increasin...
Questions
question
Mathematics, 21.11.2020 01:00
question
Mathematics, 21.11.2020 01:00
question
Mathematics, 21.11.2020 01:00
question
English, 21.11.2020 01:00
question
Mathematics, 21.11.2020 01:00
question
History, 21.11.2020 01:00
question
Mathematics, 21.11.2020 01:00
Questions on the website: 13722367