## Star and Bars – Combinatorics for CP

Hello guys, welcome back to “code with asharam”. I am back with another mathematics for competitive programming post. In this post, I will discuss star and bars technique to solve a specific set of combinatorics problems. This technique is called ball and urn approach. Problems based on this topic appears quite frequently in competitive programming …

## Prime Factors Algorithm – A beginner’s Guide

Hello guys, welcome back to “code with asharam”. I will continue with my mathematics for competitive programming series in this post. In the last post, I discussed various Prime Numbers algorithms. One of the most important topics related to Prime Numbers is Prime Factors. You can find at least one problem related to prime factors …

## Prime Numbers Algorithms – A beginner’s guide

Hello guys, welcome back to “code with asharam”. I will continue with my mathematics for Competitive Programming Series in this post. Prime Numbers is I guess most frequent topics in competitive programming. Almost in every contest, you can find something related to primality testing, seive of eratosthenes or finding prime factors. Therefore, it becomes very …

## Modular Arithmetic For Competitive Programming

Hello guys, welcome back to “code with asharam”. I will continue with my mathematics series in this post. So, in this post I will discuss one of the most frequent topics in competitive programming – Modular Arithmetic. Finding modulo is really simple but finding inverse modulo is little tricky. That’s why I will tell you …

## GCD For Competitive Programming

Hello guys, welcome back to “code with asharam”. I know you would have got tired of hearing long break excuses every time I write a new post. So, this time I won’t make any excuse for 17 day long break. As you might have noticed until now that I will write about GCD in this …

## Matrix Exponentiation – A Complete guide

Hello guys, welcome back to “code with asharam”. This has been a long break. I guess my last post by almost 16 days ago. I am sorry for such a long break but there has been many events such as Google Codejam Qualification and Round 1A. And there was Codechef April long challenge. So, I …

## Fibonacci Sequence – A complete guide

Hello guys, welcome back to “code with asharam”. In this post, I am going to introduce you to basic and advanced concepts of Fibonacci Sequence. I will be discussing the various approaches you can choose to find the nth term of Fibonacci Sequence. This post is for complete beginners and do not require any prior …

## Bit Masking and DP | Part 1 | Assign Caps to Persons

Hello guys, welcome back to “code with asharam”. This has been the longest break we ever had. I had kickstart in this week and I also posted the solutions of the kickstart which led to such a long delay in posting this tutorial. But don’t worry, from now on, I will try my best to …