Skip to main content

Posts

Data Structures and Algorithms Resources

 So, I think it's high time to write an article on this as there are almost hundreds of videos and blogs, but still, we find it difficult to have a proper syllabus and structure. First of all, I list all the resources from which you can learn the theory part at least: Abdul Bari Series on Youtube( link ): Though he teaches slow, I still think he is one of the best teachers to learn the theory of DS and Algo. Code-N-Code ( link ): Waqar Ahmed has made a brilliant youtube channel where you can find in-depth playlists on almost all data structures and algorithms. His approach is based on Competitive Programming and you would really like it if you are a CP fan. GFG: Yeah, it's always on the list! You should use it as a reference and not define your syllabus from it, as its number of articles is enormous. Just google stuff and you would always find it on top. For example, after getting a -100 drop in rating😣, you are on fire inside and see that DP is your weak topic. And the next t...

So much things to do, Yet Idle

It's kind of weird but sometimes, I just have tons of things to do, yet I am reluctant to do any of them, like some massive form of energy would come and do that automatically. And this is now for over a week, and I finally though of doing something which I am always ready for and excited for: writing a blog! Although it is just to motivate me, you may just read it for seeing how people get energy from what they love  😉. So, let's jot down every possible thing I gotta do in upcoming months: > CodeKaksha > Game of Codes( Making Blogs and slight improvements) > DTU Times: PhP, Laravel, SQL, and more importantly setting up my dev environment and understanding some codebase from top level. > GSOC: I have selected an organisation for which I have to learn Ruby on Rails. But that's not the point, I just have to  install it locally and understand company's vision. And raise and solve issues. > DSA: Yeah, all of these go to vain if I don't do this in JEE sty...

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%...

An Idea- Just an Idea

An idea came to me today: let's talk about how to get ideas!  What should be the thought process when we are thinking of an idea.  We all want to make an impact and we all got some great ideas, some of us even take action to complete them, but only a small fraction of us actually succeed in making an actual impact. Let's see some of the rules we should follow: Write down everything! First and foremost, always have a pen and paper while brainstorming about the idea.  Think of the problem first, not the solution! Next, just think of the problems you are facing and how your idea is gonna be helpful for you. And the best part is, many great ideas are revolving just around you, you have to identify your problems and they should be the actual source of the idea.  Next, always think of a simple way out of the problem. Nowadays people are really smart and would only use your product/app/website if they feel that a great need. Making them pay for it is far more difficult. So,...

Path Finding Algos

 Breadth First Search(BFS) Breadth first search's principle is quite simple, traverse level by level until we find the destination. Now, in a grid system we can traverse by making a radial expansion having center as the source cell. So you may see such visualization which is quite self explanatory. But how do you implement that? Algorithm: 1. Make a queue and push the source vertex in it.  2. while(q.length!=0) Pop the element from stack check if any of points  (x+1,y), (x,y+1),(x-1,y) and (x,y-1) are destination vertex. If yes: return If no: push  (x+1,y), (x,y+1),(x-1,y) and (x,y-1) into stack. Code:  class QItem { public : int row; int col; int dist; QItem( int x, int y, int w) : row(x), col(y), dist(w) { } }; int minDistance( char grid[N][M]) { QItem source( 0 , 0 , 0 ); // To keep track of visited QItems. Marking // blocked cells as visited. bool visited[N][M]; for (...