Skip to main content
Templates (for CP)
- Next smaller element in left and right side of any element - Link (Can easily modify)
- Next greater element for both sides in one pass - Link
- String Hashing - Link
- MUST call precalc() inside function
- Count inversions in any random array (GENERAL) - Link
- Count inversions in binary string - Link
- Sum of XOR of all subarrays - Link ——₪—— Original question link
- Sum of XOR of all subsequence - Link ——₪—— Original question link
- Prefix sum of 2-D array - Link
- Number of subarrays with sum = k → Link
- Number of subarrays with sum divisible by k → Link
- Segment Trees → Link
- djikstera algorithm - Link
- Prime Factorization of given number n → Link
- Count no. of divisors in O(N⅓) → Link
Comments
Post a Comment