Sorting & SearchingHello Readers! In this blog, we will solve sorting and searching problems from the CSES problem set. We will solve some problems and try to understand the logic behind them, and how the idea of sorting can be used to solve various kinds of problems. ...Apr 24, 2023 · 4 min readteckbakers.hashnode.dev
Pigeonhole PrincipleHello Readers, The pigeonhole principle is quite straightforward but it can be used under various circumstances. It is also called Dirichlet's box principle or Dirichlet's drawer principle. If you have nine pigeonholes and nine pigeons. It is possibl...Mar 27, 2023 · 6 min readteckbakers.hashnode.dev
Fenwick TreeHello Readers, Introduction Here, I will be discussing an interesting data structure called "Fenwick Tree". Its structure was proposed by Boris Ryabko and was described by Peter Fenwick in an article from 1994. It is also called the "Binary Indexed T...Mar 9, 2023 · 5 min readteckbakers.hashnode.dev
Difference Array TechniqueTechnique It is a simple technique that can give you an end array after performing range queries of the form update(l, r, x). NOTE: update(l, r, x) means add x to all the elements in an array within the range l to r. arr[l] += x, arr[l + 1] += x, arr...Feb 28, 2023 · 6 min readteckbakers.hashnode.dev
Editorial for TechnovationThis is an editorial for the Technovation contest. Due to less number of test cases, some brute force leads to "AC" :( Contest Link Problem -A Due to lower constraints, one can solve this problem using brute force. But when the constraint is as follo...Feb 20, 2023 · 3 min readteckbakers.hashnode.dev