Looking for FIT2004 Algorithms and data structures - S2 2026 test answers and solutions? Browse our comprehensive collection of verified answers for FIT2004 Algorithms and data structures - S2 2026 at learning.monash.edu.
Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!
Consider a directed, weighted graph G with |V| vertices and |E| edges. What is the worst-case time complexity of counting the incoming edges of vertex v, if G is implemented using an unsorted adjacency list?
Consider a directed, weighted graph G with |V| vertices and |E| edges. What is the worst-case time complexity of finding the edge of largest weight, if G is implemented using an unsorted adjacency list?
Consider a directed, weighted graph G with |V| vertices and |E| edges. What is the worst-case time complexity of counting the incoming edges of vertex v, if G is implemented using an adjacency matrix?
Each of the recurrences below appears somewhere in this week's material. In a bottom-up implementation, which one can be evaluated using only a constant amount of extra space — keeping a fixed number of previously computed values rather than the whole table?
You find yourself curiously stranded on an n × n mysterious grid (shown below), unsure of how you got there, or how to leave. You denote the rows of the grid from bottom to top as 1, 2, ..., n, and similarly denote the columns from left to right as 1, 2, ..., n. Cell (i, j) refers to row i, column j.
You are currently standing at the bottom-left corner of the grid and wonder to yourself how many different ways there are to walk to the top-right corner of the grid. However, there are certain conditions on the grid's cells.
In the normal cells of the grid (cells with white background below), you feel fatigued and are only able to move to the cell to the immediate right (to the next column). In the special cells of the grid (cells with blue background below), you feel more energised and are able to move either to the cell that is immediately up (to the next row) or immediately right (to the next column).
Which of the following options describe correct dynamic programming recurrences for those cells? Select all correct options.
Floyd-Warshall has finished on a directed graph with some negative edge weights.
Which feature of the final matrix says the graph has a negative cycle?