Posts by Shoif Md Mia

Author Biographical Info: Not available

Natural summation pattern in Python

By Shoif Md Mia

In this tutorial, we will learn how to print the natural summation pattern in Python. We will take natural number as input and the program will print the summation pattern. This is.... Read More

C++ program to Check if all leaves are at same level

By Shoif Md Mia

A node of a tree is called leaf when it’s both the children are NULL. Now, in a given binary tree, we have to check whether all the leaves are at the same level. In this tree.... Read More

Josephus problem and recursive solution in Java

By Shoif Md Mia

In this tutorial, we will be learning Josephus problem and its recursive solution in Java. Suppose we have p persons standing in a circle. In the beginning, there is a sword in som.... Read More

Merge two std::queue in C++

By Shoif Md Mia

Queue is a data structure that follows FIFO (first in first out) manner. In a queue, we can push values of similar (fixed for a queue) data type. If we try to pop an element then t.... Read More

Shortest path in an unweighted graph in C++

By Shoif Md Mia

In an unweighted graph from a source to the destination, we may have several paths. We have to find out the shortest path among all in C++. Let’s have an example: Our graph b.... Read More

Find Floor in a Sorted Array in Python

By Shoif Md Mia

In a sorted array floor of value (say, x) means the maximum value present in the array which is less than or equal to that value (x). Let’s clarify the problem with some exam.... Read More

C++ Program to check if a matrix is invertible

By Shoif Md Mia

The first necessary condition for a matrix to have an inverse is, the matrix has to be a square matrix (m*n matrix is not allowed). The matrix has to be of order n*n. Suppose we ha.... Read More

Related Posts