Algorithm Analysis -- 3

Suljettu Julkaistu 3 vuotta sitten Maksettu toimituksen yhteydessä
Suljettu Maksettu toimituksen yhteydessä

i need help with this algorithm....:

Suppose that you are attending a one-day conference in which several lectures are presented in parallel sessions (i.e., more than one lecture may by running at the same time). Lectures may be of different lengths. The lectures schedule is given to you in an array L, such that L[i].id is the ID of a lecture, L[i].start is the starting time of that lecture and L[i].end is the end time of that lecture. If you attend a lecture, you must attend it from the beginning until the end of it (you are not allowed to attend lectures partially). You want to attend as many lectures as possible.

a) Give the pseudocode of an algorithm that takes as input the array L and finds the maximum number of lectures that you can attend.

You can assume that the starting times and end times are integers representing time. The conference starts at time 0 and ends at some time s.

If you need to use a binary search algorithm or a sorting algorithm, you can just call it without giving its pseudocode. If you need to use any other algorithm, you should give its pseudocode.

b) What is the design technique you used in part (a)?

Algoritmi Java C-ohjelmointi Algorithm Analysis

Projektin tunnus: #29959291

Tietoa projektista

2 ehdotusta Etäprojekti Aktiivinen 2 vuotta sitten

2 freelanceria on tarjonnut keskimäärin $30 tähän työhön

khaledabutalb

I'm expert at OOP, Data structure, Algorithms, Design Patterns, unit testing. I solved 2820 Algorithm Problems at online judge. I have wide range skillset to complete your project efficiently. I will do my best to resp Lisää

$30 USD 1 päivässä
(29 arvostelua)
3.5
ramehta

Sort the lectures with starting time. Then fill a table with each lectures as starting lectures and mark lectures falling on the longest path till end. Optimize here for calculation. Finally find all possible maximum l Lisää

$30 USD 7 päivässä
(0 arvostelua)
0.0