Inspired by the discussion at Almost-LCA in Tree, I wanted to pose a similar question:
Is there a simple solution to
- preprocess a tree with weighted edges in $$$O(n)$$$ or $$$O(n \log n)$$$ and
- query the maximum edge weight along the path from $$$u$$$ to $$$v$$$ in O(1)?
Once again, jump pointers can be used to solve each query in $$$O(\log n)$$$ with bad constant factor. Are there faster solutions?