Arnab Chakraborty has Published 3734 Articles

Minimize Cost with Replacement with other allowed in C++

Arnab Chakraborty

Arnab Chakraborty

Updated on 21-Oct-2019 07:19:38

263 Views

Suppose we have an array with N elements. We have to remove element from the array by following the given operations. The operation is like, we have to choose any two numbers of the array, and remove larger. Cost including in this operation is the same as the smaller number. ... Read More

Meta Strings (Check if two strings can become same after a swap in one string) in C++

Arnab Chakraborty

Arnab Chakraborty

Updated on 21-Oct-2019 07:17:11

741 Views

In this section, we will see how to check whether two strings are meta string or not. The meta strings are those strings that are very much similar. If we swap two elements in one string, then it will be matched with other string. Suppose two strings are “HELLO” and ... Read More

Maximum Subarray Sum using Divide and Conquer algorithm in C++

Arnab Chakraborty

Arnab Chakraborty

Updated on 21-Oct-2019 07:14:08

1K+ Views

Suppose we have one list of data with positive and negative values. We have to find the sum of contiguous subarray whose sum is largest. Suppose the list is containing {-2, -5, 6, -2, -3, 1, 5, -6}, then the sum of maximum subarray is 7. It is the sum ... Read More

Maximum positive integer divisible by C and is in the range [A, B] in C++

Arnab Chakraborty

Arnab Chakraborty

Updated on 21-Oct-2019 07:10:26

184 Views

Here we will see one interesting problem. let us consider we have three integers A, B, and C. We have to find one minimum integer X, such that X mod C = 0, and X is not in the range [A, B]. If the values of A, B and C ... Read More

Maximum length subarray with LCM equal to product in C++

Arnab Chakraborty

Arnab Chakraborty

Updated on 21-Oct-2019 07:07:31

416 Views

Suppose we have an array A. We have to find the maximum length of the subarray, whose LCM is the same as the product of the elements of that subarray. If that kind of subarray is not found, then return -1. Suppose array is {6, 10, 21}, then the length ... Read More

Maximum GCD from Given Product of Unknowns in C++

Arnab Chakraborty

Arnab Chakraborty

Updated on 21-Oct-2019 06:59:29

181 Views

Suppose we two integers N and P. The P is the product of N unknown integers. We have to find the GCD of those integers. There can be different groups of integers possible, that will give the same result. Here we will produce GCD, which is maximum among all possible ... Read More

Maximum Consecutive Zeroes in Concatenated Binary String in C++

Arnab Chakraborty

Arnab Chakraborty

Updated on 17-Oct-2019 13:40:16

495 Views

Suppose we have a binary string of length n, another value say k is given. We have to concatenate the binary string k times. Then we have to find the maximum number of consecutive 0s in the concatenated string. Suppose binary string is “0010010”, and k = 2, then after ... Read More

Split the array into equal sum parts according to given conditions in C++

Arnab Chakraborty

Arnab Chakraborty

Updated on 17-Oct-2019 13:36:42

877 Views

Here we will see one problem. Suppose one array arr is given. We have to check whether the array can be split into two parts, such that −Sub of both sub-arrays will be the sameAll elements, which are multiple of 5, will be in the same groupAll elements which are ... Read More

Process Communication in Operating System

Arnab Chakraborty

Arnab Chakraborty

Updated on 17-Oct-2019 11:27:36

6K+ Views

Processes that executing concurrently in the operating system may be either independent processes or cooperating processes. if a process cannot affect or be affected by the other processes executing in the system then the process is said to be independent. So any process that does not share any data with ... Read More

Program execution in CPU

Arnab Chakraborty

Arnab Chakraborty

Updated on 17-Oct-2019 11:19:43

2K+ Views

One may be amazed how the CPU is programmed. A special register is contained in CPU-the instruction register-whose bit pattern determines what the CPU will do. Once that action has been completed, the bit pattern in the instruction register can be changed, and the CPU will perform the operation specified ... Read More

Advertisements