Arnab Chakraborty has Published 4293 Articles

A Peterson Graph Problem in C Program?

Arnab Chakraborty

Arnab Chakraborty

Updated on 19-Aug-2019 14:22:04

303 Views

Suppose we have one graph like below. That graph is Peterson graph. The vertices are numbered from 0 through 9. Each vertex has some letters. Let consider one walk W, in that graph, where L vertices are used. A string S with L letters is realized by the walk W ... Read More

A C/C++ Pointer Puzzle?

Arnab Chakraborty

Arnab Chakraborty

Updated on 19-Aug-2019 14:15:22

390 Views

Suppose we have one integer variable whose size is 4 byte, another pointer variable is there, whose size is 8 bytes. So what will be the output of the following?Example#include using namespace std; main() {    int a[4][5][6];    int x = 0;    int* a1 = &x;    int** a2 = &a1;    int*** a3 = &a2;    cout

A Boolean Array Puzzle In C Program?

Arnab Chakraborty

Arnab Chakraborty

Updated on 19-Aug-2019 14:11:21

300 Views

Here we will see one Boolean array puzzle. One array is given with two elements 0 and 1. We have to make all elements to 0. There are some specifications that we should consider −In the array one element is 0, that is fixed, but we do not know what ... Read More

3-digit Osiris number C Program?

Arnab Chakraborty

Arnab Chakraborty

Updated on 19-Aug-2019 14:07:54

157 Views

Here we will see the Osiris number. An Osiris number is such kind of number that are equal to the sum of permutations of sub-samples of their own digits. Suppose the number is 132. Then if we calculate {12 + 21 + 13 + 31 + 23 + 32} this ... Read More

C++ program to read file word by word?

Arnab Chakraborty

Arnab Chakraborty

Updated on 13-Aug-2019 10:28:27

5K+ Views

In this section we will see how we can read file content word by word using C++. The task is very simple. we have to use the file input stream to read file contents. The file stream will open the file by using file name, then using FileStream, load each ... Read More

Huffman Coding

Arnab Chakraborty

Arnab Chakraborty

Updated on 05-Aug-2019 07:44:26

9K+ Views

Huffman coding is lossless data compression algorithm. In this algorithm a variable-length code is assigned to input different characters. The code length is related with how frequently characters are used. Most frequent characters have smallest codes, and longer codes for least frequent characters.There are mainly two parts. First one to ... Read More

Breadth First Search or BFS for a Graph

Arnab Chakraborty

Arnab Chakraborty

Updated on 05-Aug-2019 06:55:55

2K+ Views

The Breadth First Search (BFS) traversal is an algorithm, which is used to visit all of the nodes of a given graph. In this traversal algorithm one node is selected and then all of the adjacent nodes are visited one by one. After completing all of the adjacent vertices, it ... Read More

Depth First Search or DFS for a Graph

Arnab Chakraborty

Arnab Chakraborty

Updated on 05-Aug-2019 06:50:03

1K+ Views

The Depth First Search (DFS) is a graph traversal algorithm. In this algorithm one starting vertex is given, and when an adjacent vertex is found, it moves to that adjacent vertex first and try to traverse in the same manner.It moves through the whole depth, as much as it can ... Read More

Graph and its representations

Arnab Chakraborty

Arnab Chakraborty

Updated on 05-Aug-2019 06:43:27

7K+ Views

The graph is a non-linear data structures. This represents data using nodes, and their relations using edges. A graph G has two sections. The vertices, and edges. Vertices are represented using set V, and Edges are represented as set E. So the graph notation is G(V, E). Let us see ... Read More

Amortized Complexity

Arnab Chakraborty

Arnab Chakraborty

Updated on 05-Aug-2019 06:38:15

4K+ Views

Amortize AnalysisThis analysis is used when the occasional operation is very slow, but most of the operations which are executing very frequently are faster. In Data structures we need amortized analysis for Hash Tables, Disjoint Sets etc.In the Hash-table, the most of the time the searching time complexity is O(1), ... Read More

Advertisements