CS2040 CheatSheet

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

SSSP Problem

1. To reverse a data structure, use Collections.reverseOrder() to return a


comparator to be used.
* e.g. new PriorityQueue<>(Collections.reverseOrder())

2. To reverse a list, use Collections.reverse()


* Note that this only works for list!

3. Graph colouring can be a very useful technique in solving graph


problems!

You might also like