Binary Indexed Tree (Fenwick Tree) Posted 02/07/2023 A Fenwick tree or binary indexed tree (BIT) is a data structure that can efficiently update elements and calculate prefix sums in a table of numbers
Collection of bit mask operation Posted 02/07/2023 I have collected a few popular and useful bit operations
Modular Inverse Posted 02/06/2023 In arithmetic, a modular multiplicative inverse of an integer a is an integer x such that the product a*x = 1 with respect to the modulus m
Subarray Sums Divisible by K Posted 01/19/2023 Given an array of integers and an integer k, the problem is to find the total number of continuous subarrays whose sum is divisible by k
Increment Submatrices by One Posted 01/15/2023 The problem is to increment all elements of submatrices by 1, given a matrix of integers, the task is to return the updated matrix where all elements of submatrices are incremented by 1