Question: 1. Consider a 2D array of integers, so that elements in each row are sorted. The elements of each column are sorted as well. Both

1. Consider a 2D array of integers, so that elements in each row are sorted. The elements of each column are sorted as well. Both rows and columns are sorted in increasing order. Propose a divide and concur approach to find whether a specific value is in the array. Analysis the time complexity of your approach. (10 marks) 2. Suppose there exist n ropes. They have different length. The goal is to connect them so that they become one piece. The cost of connecting rope 1 and rope 2 equals to the sum of the length of rope 1 and rope 2, plus 1. Bring a greedy algorithm which connect all n ropes with the minimum cost
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
