![]() |
Weekly Problems #05 |
| Pedro Ribeiro - DCC/FCUP |
This is one of 11 weekly problem sets. Each one is worth 10% of the grade of the "Submitted Implementation" evaluation criteria.
6 proposed problems:
- Use cumulative sums
- Can you see how to use Kadane algorithm on one dimension to reduce the runtime complexity to \(\mathcal{O}(n^3)\)?
- Can you see how the number of crossing is equal to the number of "inversions"?
- Can you use a fenwick tree (with single queries and single updates) to compute?
- Which position should have the highest value? And the 2nd highest? ...
- How to use fenwick trees to compute frequencies of positions in the queries?
  (perhaps using range updates and single queries?)
- Use a fenwick tree with range update and range queries
- Use a 2D fenwick tree
- A "naive" fenwick tree approach will not fit on memory...
- Would processing the trees and queries in a different order help you?
About the delivery:
Pedro Ribeiro - DCC/FCUP | Last update: