Posts by Srirama Charan

Author Biographical Info: Not available

Chinese Remainder Theorem with solution in C++

By Srirama Charan

Today we will see a rather interesting problem called the Chinese remainder problem and try to understand the theory behind it. The Chinese Remainder theorem was first introduced b.... Read More

The Two Knights Problem (Implemented in C++)

By Srirama Charan

The two knights problem is a general mathematical challenge, where we have to find the total number of ways to place two knights on an nxn chessboard such that they do not attack e.... Read More

Lexicographic Rank of a Word in C++

By Srirama Charan

Today, we will see how to find the lexicographic rank of a string in C++. The lexicographic rank of a string means the rank of the given string in a list of permutations of the giv.... Read More

Smallest Immediate Palindrome Problem in C++

By Srirama Charan

Today, we will see a very interesting problem usually referred to as the next palindrome problem. The problem states that, given a positive integer, we need to find the smallest pa.... Read More

Two sets program in C++

By Srirama Charan

Today, we will see a basic problem in C++ and try to find an efficient algorithm for it. The problem goes like this. We are given an integer n and we have to divide the numbers 1,2.... Read More

Find Prime Numbers in a Range in C++ (Segmented Sieve Method)

By Srirama Charan

Today, we will see two methods to find the prime numbers in a given range in C++ programming. The problem statement goes like this, we take the lower limit and upper limit for a ra.... Read More

A C++ program for Unrolled List

By Srirama Charan

In this tutorial, we will see how to implement an Unrolled Linked List in C++. Unrolled Linked List is a variation of the normal Linked List where more than one element is stored a.... Read More