Computer Science question

You will find the minimum element from the lists of integers.

Input: [[5,2,31,9],[2,1,6,7,11],[55,1,7,8,9]]

Output: 1. [The minimum among the lists of integers]

1. Implement a program of O(N^k) runtime complexity of the problem.

2. Implement a program of ~ O(N*logN) runtime complexity of the above same problem and explain how you have achieved. [Hint : Apply the log rule -> sort the list of integers, then compare the first element of each]

You can choose either Python, Java to implement 1 & 2.

SAMPLE ASSIGNMENT
Powered by WordPress