It's UWAweek 42 (2nd semester, week 12)

help2200

This forum is provided to promote discussion amongst students enrolled in CITS2200 Data Structures and Algorithms.

Please consider offering answers and suggestions to help other students! And if you fix a problem by following a suggestion here, it would be great if other interested students could see a short "Great, fixed it!"  followup message.

How do I ask a good question?
Displaying the 4 articles in this topic
Showing 4 of 176 articles.
Currently 4 other people reading this forum.


 UWA week 22 (1st semester, study break) ↓
SVG not supported

Login to reply

👍?
helpful
2:04pm Mon 27th May, ANONYMOUS

hi, just wondering.. is anyone actually able to reach the time complexity of O(NlogN) in trains_planes? at the moment I am only able to reach a time complexity of O(AB) where A & B is the number of trains and planes respectfully.


SVG not supported

Login to reply

👍?
helpful
3:01pm Mon 27th May, Amitava D.

ANONYMOUS wrote:
> hi, just wondering.. is anyone actually able to reach the time complexity of O(NlogN) in trains_planes? at the moment I am only able to reach a time complexity of O(AB) where A & B is the number of trains and planes respectfully.
This is Dijkstra's algorithm that has a time complexity of O((V+E)log V) as covered in the lectures. Here N is V+E.


SVG not supported

Login to reply

👍?
helpful
8:07pm Mon 27th May, ANONYMOUS

Wouldn't dijkstra's algorithm need to be done for each iteration of planes though? So it would be (number of planes) * ((V+E)logV)?


SVG not supported

Login to reply

👍?
helpful
10:22am Tue 28th May, Amitava D.

ANONYMOUS wrote:
> Wouldn't dijkstra's algorithm need to be done for each iteration of planes though? > > So it would be (number of planes) * ((V+E)logV)?
You can do better without directly running Dijkstra's algorithm, by using set operations.

The University of Western Australia

Computer Science and Software Engineering

CRICOS Code: 00126G
Written by [email protected]
Powered by history
Feedback always welcome - it makes our software better!
Last modified  8:08AM Aug 25 2024
Privacy policy