Skip to main content

Posts

Showing posts from December, 2020

Trees Pt I

Trees: All Branches One place Trees are hierarchal data structures built to store information that is connected to each other. As the name suggests, it is a tree, just upside down that stores data in its leaves and connected through branches .  So, this was the introduction, now let's see what we gonna cover in this blog: Applications of trees Binary Trees Traversals Some Trivial Questions The diameter of a binary tree LCA of Binary Tree Questions(Trivial) This is all we gonna cover. This part is not that much tough, but it's likely to get a little frustrating when it comes to trivial questions. (At least for me 😢 )

Important Hackathons and Coding Contests

I thought it would be the right time for juniors and second years like me, to have some important dates in hand instead of just Mirzapur season release dates. So these are some sites, some annual hackathons, which I researched, and have compiled for you all, also, it includes some internships as well. So, get yourself some pen and paper, and let's start: Hackathons: Some important sites which conduct hackathons: Devfolio Devpost MLH Hackerearth https://www.hackathon.io/network http://www.hackalist.org/ Some important hackathons which occur annually: SIH Some important open source programmes GSOC

Number theory Pt II

The Return of Number Theory  We covered in the First part: Primarily Test Prime Factorisation Sieve of Eratosthenes Binary Exponentiation Euclid's Algorithm for GCD Number of divisors/sum of divisors Segmented Sieve We would cover: Modulus Operations Binomial Coefficients Extended Euclidian Algorithm Diophantine Matrix Exponentiation Fibonacci in O(log(n)) Chinese Remainder Theorem Euler's Totient Function And these are the methods which we would cover only in theory, no questions in the fight: Pollard p-1 Pollard rho algorithm Modulus Arithmetic: Before jumping to the formulas for addition, subtraction, etc., firstly, let's have a look at what is M odular Congruence. Modular Congruences: a and b are modular congruent under n if they give the same remainder on dividing by n. Representation: a  ≡ b(mod n)   What that means is that wherever you are given a%n, you can replace it with b%n and it would have no impact no final answer, for example,  9=13 mod 4 (12+9)%4=21%...