Tapas Kumar Ghosh has Published 150 Articles

Find array sum using Bitwise OR after splitting given array in two halves after K circular shift

Tapas Kumar Ghosh

Tapas Kumar Ghosh

Updated on 10-May-2023 14:06:25

99 Views

In C++ splitting an array mean dividing the array into more than one subarray. The Bitwise OR is used to handle the comparison and calculation between two bits or indexes in C++. In this article, we use k circular shift which means the last index position will be shifted to ... Read More

Difference between Backtracking and Branch-N-Bound technique

Tapas Kumar Ghosh

Tapas Kumar Ghosh

Updated on 10-May-2023 13:59:21

6K+ Views

The Backtracking technique is an algorithm used to solve the decision problem whereas the Branch-N-Bound technique is an algorithm used to solve the optimization problem. Both techniques follow the brute force method and are used to generate the State Space tree. A State Space tree is the tree that represents ... Read More

Check if product of Array elements in given range are M-th root or not

Tapas Kumar Ghosh

Tapas Kumar Ghosh

Updated on 10-May-2023 13:54:11

112 Views

M-th root is defined as the cube of any number and array ranges mean to count the indexes from first to end. We will take three numbers in the array range as input and see if their product value comes in the form of a cube value then it will ... Read More

Check if it is possible to reach the index with value K when start index is given

Tapas Kumar Ghosh

Tapas Kumar Ghosh

Updated on 10-May-2023 13:32:57

79 Views

C++ has a bitwise operator “||” to check multiple conditions at once and for finding the length of an array we use the size() function. In the given problem statement, we need to reach the K-th value which sets to 0 in the array range, and the starting index is ... Read More

Inversion Count using Policy Based Data Structure

Tapas Kumar Ghosh

Tapas Kumar Ghosh

Updated on 10-May-2023 12:43:42

106 Views

We will use the g++ header file to compile the code in C++ compiler. g++ is a Linux based header file that is used in C++ to compile the code of policy based data structure. The policy based data structure are such structures used for high performance and flexibility of ... Read More

Find strings that end with a given suffix

Tapas Kumar Ghosh

Tapas Kumar Ghosh

Updated on 10-May-2023 12:24:01

303 Views

C++ has a predefined function substr to return the portion of string and compare function to check the sequence of characters. The suffix means the group of characters added to the end of the word. In this article, we are going to find the strings that end with a given ... Read More

Finding the shortest path between any two nodes using Floyd Warshall Algorithm

Tapas Kumar Ghosh

Tapas Kumar Ghosh

Updated on 10-May-2023 12:17:36

798 Views

C++ has a macro which is defined as a piece of code or desired value and it will use repetitively again and again whenever the user wants. The Floyd Warshall Algorithm is the process of finding the shortest path between all pairs of vertices in a given weighted graph. This ... Read More

Minimum cost of reducing Array by merging any adjacent element repetitively

Tapas Kumar Ghosh

Tapas Kumar Ghosh

Updated on 10-May-2023 11:47:41

257 Views

In C++ we have a pop() function to remove the element from the beginning. The top() function returns the reference of the first element of the priority_queue whereas the push() function is used to insert an element on it. A priority queue is a part of the data structure that ... Read More

String Range Queries to count number of distinct character with updates

Tapas Kumar Ghosh

Tapas Kumar Ghosh

Updated on 10-May-2023 11:34:14

209 Views

A string range query is the range of characters present in the string where a character starts from the index[0] and the last index[] may be specified according to the length of a given string. In this article, we are going to learn how string range queries count the number ... Read More

Number of times an array can be partitioned repetitively into subarrays with equal sum

Tapas Kumar Ghosh

Tapas Kumar Ghosh

Updated on 10-May-2023 11:28:56

82 Views

In C++ we have a vector header file that can change the size of an array during runtime. In this article, we are going to learn the concept of the number of times an array can be partitioned repetitively into subarrays with equal sum. Let’s take an example to show ... Read More

Advertisements