Arnab Chakraborty has Published 4293 Articles

Find the Largest Cube formed by Deleting minimum Digits from a number in Python

Arnab Chakraborty

Arnab Chakraborty

Updated on 27-Aug-2020 12:59:58

167 Views

Suppose we have a number N, we have to determine the largest perfect cube that can be generated by removing minimum digits (possibly 0) from the number. We can delete any digit from the given number to reach the target. As we know a number N is called a perfect ... Read More

Find the largest Complete Subtree in a given Binary Tree in Python

Arnab Chakraborty

Arnab Chakraborty

Updated on 27-Aug-2020 12:56:20

299 Views

Suppose we have a Binary Tree; we have to find the size of maximum complete sub-tree in this Binary Tree. As we know a complete binary tree is a Binary Tree if all levels are completely filled without possibly the final level and the final level has all keys as ... Read More

Find a pair from the given array with maximum nCr value in Python

Arnab Chakraborty

Arnab Chakraborty

Updated on 27-Aug-2020 12:50:19

196 Views

Suppose we have an array arr with n integers, we have to find arr[i] and arr[j] from the array such that arr[i]Carr[j] is at large as possible. If there is more than one pair, return any one of them.So, if the input is like [4, 1, 2], then the output ... Read More

Minimum removals from array to make GCD Greater in Python

Arnab Chakraborty

Arnab Chakraborty

Updated on 27-Aug-2020 12:45:31

207 Views

Suppose we have a list of N numbers; we have to find the minimum number of removal of numbers are required so that the GCD of the remaining numbers is larger than initial GCD of N numbers.So, if the input is like [6, 9, 15, 30], then the output will ... Read More

What happens when a virtual function is called inside a non-virtual function in C++

Arnab Chakraborty

Arnab Chakraborty

Updated on 27-Aug-2020 12:43:40

319 Views

In this section we will discuss about interesting facts about virtual classes in C++. We will see two cases first, then we will analyze the fact.At first execute the program without using any virtual function.The execute the program using any virtual function under non-virtual function.ExampleLet us see the following implementation ... Read More

Find three element from different three arrays such that that a + b + c = sum in Python

Arnab Chakraborty

Arnab Chakraborty

Updated on 27-Aug-2020 12:41:39

214 Views

Suppose we have three arrays A, B, C and another value called "sum", We have to check whether there are three elements a, b, c such that a + b + c = sum and a, b and c should be under three different arrays.So, if the input is like ... Read More

Minimum edges required to add to make Euler Circuit in Python

Arnab Chakraborty

Arnab Chakraborty

Updated on 27-Aug-2020 12:40:55

189 Views

Suppose we have an undirected graph of b number of nodes and a number of edges; we have to find minimum edges needed to build Euler Circuit in this graph.So, if the input is likethen the output will be 1.To solve this, we will follow these steps −Define a function ... Read More

Find the winner of a game where scores are given as a binary string in Python

Arnab Chakraborty

Arnab Chakraborty

Updated on 27-Aug-2020 12:40:25

254 Views

Suppose we have one binary string representing the scores of a volleyball match, we have to find the winner of the match based on following conditions −There are two teams play with each other and the team which scores 15 points first will be the winner except when both teams ... Read More

Find the winner by adding Pairwise difference of elements in the array until Possible in Python

Arnab Chakraborty

Arnab Chakraborty

Updated on 27-Aug-2020 12:36:39

153 Views

Suppose we have an array A of positive integers, the elements are unique, now, two players P and Q are playing a game. At each move, any one player picks two numbers a and b from the array and if |a – b| is not in the array after that ... Read More

Minimum Cuts can be made in the Chessboard such that it is not divided into 2 parts in Python

Arnab Chakraborty

Arnab Chakraborty

Updated on 27-Aug-2020 12:36:12

100 Views

Suppose we have one A x B chessboard (matrix), we have to calculate the maximum numbers of cuts that we can make in this board so that the board is not divided into 2 parts.So, if the input is like A = 2 and B = 4, then the output ... Read More

Advertisements