Today we are going to write a program to find the inverse of matrix C++, so let’s start with the what is the inverse of a matrix. Inverse of a Matrix: For a square matrix A, the inverse is written A-1. When A is multiplied by A-1 the result is the identity matrix I. Non-square […]

# cpp codes

## C++ Program to generate CAPTCHA and verify user

What is CAPTCHA? A CAPTCHA (Completely Automated Public Turing test to tell Computers and Humans Apart) is a test to determine whether the user is human or not. So, the task is to generate unique CAPTCHA every time and to tell whether the user is human or not by asking user to enter the […]

## Method overloading vs Method Overriding

Difference between Method Overloading vs Method overriding: Overloading can occur without inheritance. Overriding of functions occurs when one class is inherited from another class. Overloaded functions must differ in function signature i.e. either number of parameters or type of parameters should differ. In overriding, function signatures must be same. Overloaded functions are in same […]

## Red Black-Tree(RB-Tree) implementation in C++

Red Black-Tree (RB-Tree): A red-black tree is a binary search tree with one extra attribute for each node: the colour, which is either red or black. It has following properties: Every node is either red or black. Every leaf (NULL) is black. If a node is red, then both its children are black. Every simple […]

## Implement function overloading to find Area of Shapes

What is Function Overloading? When we define one function with more than one definition it is known as Function overloading. For example:

1 2 3 4 5 6 7 |
int shape(int x); int shape(int x, int y); |

We can have multiple definitions for the same function name in the same scope. The definition of the function must differ from each other by the types and/or the number of arguments in the […]

## Solution for Tower of Hanoi C++

What is Tower of Hanoi? All must be well aware of the problem of Tower of Hanoi, for those who don’t know, let’s discuss it once again. The Tower of Hanoi (also called the Tower of Brahma or Lucas’ Tower, and sometimes pluralized) is a mathematical game or puzzle. It consists of three rods, […]