[SOLVED] CSE222 Assignment 1

30.00 $

Programming resource
Digital learning resource
Category:
✓ Practical programming resource
✓ Suitable for guided study and reference
✓ Tutor guidance available when needed

Description

5/5 - (1 vote)

Problem: You are given three sorted arrays A, B, and C each having n numbers. You can assume that you can compare two elements from A∪B∪C in O(1)-time. Let k be an integer. Design an algorithm that outputs the k-th smallest element of A∪B∪C. The running time of your algorithm must be faster than O(n). Try to optimize the running time of your algorithm as much as possible.

N.B. If your algorithm runs in O(n)-time, then you will receive at most 10% credit.
1

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.