Arnab Chakraborty has Published 4282 Articles

C/C++ Program to check whether it is possible to make a divisible by 3 number using all digits in an array?

Arnab Chakraborty

Arnab Chakraborty

Updated on 31-Jul-2019 12:51:07

188 Views

In this section we will see if one array is given with n numbers, we have to check if we make a number using all of the elements of these numbers, that number will be divisible by 3 or not. If the array elements are {15, 24, 23, 13}, then ... Read More

C++ string class and its applications?

Arnab Chakraborty

Arnab Chakraborty

Updated on 31-Jul-2019 12:48:26

129 Views

The C++ has the String class. That is different than the traditional C strings. The C string is actually the character array. In C++, the string class has few different properties. It has different functions, that can be used to perform different tasks. Here we will see the important features ... Read More

C++ Program to Print Matrix in Z form?

Arnab Chakraborty

Arnab Chakraborty

Updated on 31-Jul-2019 12:43:25

264 Views

Here we will see how to print the matrix elements in Z form. So if the array is like below −5 8 7 1 2 3 6 4 1 7 8 9 4 8 1 5Then it will be printed like: 5, 8, 7, 1, 6, 7, 4, 8, 1, ... Read More

C++ Program for Zeckendorf's Theorem?

Arnab Chakraborty

Arnab Chakraborty

Updated on 31-Jul-2019 12:40:35

320 Views

Here we will see how to check whether the given sum is found by adding some nonneighbouring Fibonacci numbers or not, if so, what are the numbers? For example if the give sum value is 10, this is sum of 8 and 2. Both 8 and 2 are Fibonacci terms ... Read More

C++ Program for BogoSort or Permutation Sort?

Arnab Chakraborty

Arnab Chakraborty

Updated on 31-Jul-2019 12:38:27

308 Views

Here we will see another sorting algorithm called the Bogo Sort. This sort is also known as Permutation sort, Stupid sort, slow sort etc. This sorting algorithm is particularly ineffective sorting technique. This comes under the generate and test paradigm. It repeatedly generates a permutation until it is sorted. The ... Read More

C++ Internals?

Arnab Chakraborty

Arnab Chakraborty

Updated on 31-Jul-2019 12:32:50

296 Views

Here we will see the Class internals. Before that we will see Default constructors, which are related to internals. The default constructor is one constructor (defined by user or compiler) that does not take any argument. Now the question comes, why the default constructor is used?If the default constructor is ... Read More

Add 1 to number represented as array (Recursive Approach)?

Arnab Chakraborty

Arnab Chakraborty

Updated on 31-Jul-2019 12:24:28

342 Views

In this section we will see one interesting problem. Suppose one number is given. We have to increase this number by 1. This is extremely simple task. But here we will place the number as an array. each digit of that number is placed as an element of the array. ... Read More

Add 1 to a number represented as linked list?

Arnab Chakraborty

Arnab Chakraborty

Updated on 31-Jul-2019 12:20:04

242 Views

Here we will see how to add 1 with a number stored into a linked list. In the linked list, each digit of the numbers is stored. If the number is 512, then it will be stored like below −512 = (5)-->(1)-->(2)-->NULLWe are providing the list into the increment function. ... Read More

Active and Inactive cells after k Days?

Arnab Chakraborty

Arnab Chakraborty

Updated on 31-Jul-2019 12:16:53

376 Views

Here we will see one interesting problem. Suppose one binary array is given of size n. Here n > 3. A true value or 1 value indicates that the active state, and 0 or false indicates inactive. Another number k is also given. We have to find active or inactive ... Read More

Rat in a Maze with multiple steps or jump allowed?

Arnab Chakraborty

Arnab Chakraborty

Updated on 31-Jul-2019 12:13:48

503 Views

The rat in maze problem is one of the well-known problem of the backtracking. Here we will see that problem with little variation. Suppose one NxN maze M is given. The starting point is top left corner M[0, 0], and the destination is right bottom corner M[N – 1, N ... Read More

Advertisements