For static range minimum queries, it is possible to solve without a segment tree (using a sparse table for example, which can solve the problem in $\mathcal{O}(n \log n + q)$)
For range XOR queries, you are overcomplicating it. It can also be solved with prefix XOR. Let $pref_i=a_1\oplus a_2\oplus \dots\oplus a_i$, then $a_l\oplus a_{l+1}\oplus \dots \oplus a_r=pref_{l-1}\oplus pref_r$. This is true because $x\oplus x=0$ and $x\oplus 0=x$.
You do not need lazy propagation to solve range update queries. You can work on the partial sum array instead.
For Salary Queries, it is possible to use an implicit segment tree instead of coordinate compression. I personally find this easier to implement, but many others don't. Just letting you know it's a possibility.
For Prefix Sum Queries, you also do not need lazy propagation. You can use the same technique as subarray sum queries.
For Distinct Values Queries, you don't need Mo's algorithm, the problem can be solved in $\mathcal{O}((n+q)\log n)$ offline with a normal segment tree, or even online with a persistent segment tree.
If someone needs more details about any of these, let me know!
Thanks for the blog!
My thoughts:
For static range minimum queries, it is possible to solve without a segment tree (using a sparse table for example, which can solve the problem in $\mathcal{O}(n \log n + q)$)
For range XOR queries, you are overcomplicating it. It can also be solved with prefix XOR. Let $pref_i=a_1\oplus a_2\oplus \dots\oplus a_i$, then $a_l\oplus a_{l+1}\oplus \dots \oplus a_r=pref_{l-1}\oplus pref_r$. This is true because $x\oplus x=0$ and $x\oplus 0=x$.
You do not need lazy propagation to solve range update queries. You can work on the partial sum array instead.
For Salary Queries, it is possible to use an implicit segment tree instead of coordinate compression. I personally find this easier to implement, but many others don't. Just letting you know it's a possibility.
For Prefix Sum Queries, you also do not need lazy propagation. You can use the same technique as subarray sum queries.
For Distinct Values Queries, you don't need Mo's algorithm, the problem can be solved in $\mathcal{O}((n+q)\log n)$ offline with a normal segment tree, or even online with a persistent segment tree.
If someone needs more details about any of these, let me know!