Arnab Chakraborty has Published 4293 Articles

Program to find spreadsheet column number from the column title in C++

Arnab Chakraborty

Arnab Chakraborty

Updated on 21-Oct-2020 12:02:35

144 Views

Suppose we have a column title of spreadsheet. We know that the spreadsheet column numbers are alphabetic. It starts from A, and after Z, it will AA, AB, to ZZ, then again AAA, AAB, to ZZZ and so on. So column 1 is A, column 27 is Z. Here we ... Read More

Program to find spreadsheet column title from the column number in C++

Arnab Chakraborty

Arnab Chakraborty

Updated on 21-Oct-2020 12:00:42

216 Views

Suppose we have a positive integer value; we have to find its corresponding column title as appear in a spread sheet. So [1 : A], [2 : B], [26 : Z], [27 : AA], [28 : AB] etc.So, if the input is like 29, then the output will be AC.To ... Read More

Program to schedule tasks to take smallest amount of time in Python

Arnab Chakraborty

Arnab Chakraborty

Updated on 21-Oct-2020 11:59:05

238 Views

Suppose we have a list of values called tasks where each different value represents a different task type, and we also have a non-negative integer k. Each task wants one minute to complete, but we must wait k minutes between doing two tasks of the same type. At any time, ... Read More

Program to find number of given operations required to reach Target in Python

Arnab Chakraborty

Arnab Chakraborty

Updated on 21-Oct-2020 11:57:08

396 Views

Suppose we have two values start and end, we have to find the minimum number of operations needed to convert start to end by using these operations −Decrement by 1Multiply by 2So, if the input is like start = 2, end = 7, then the output will be 3, as ... Read More

Program to check whether given tree is symmetric tree or not in Python

Arnab Chakraborty

Arnab Chakraborty

Updated on 21-Oct-2020 11:54:58

291 Views

Suppose we have one binary tree. We have to check whether the tree is symmetric tree or not. A tree will be said to be symmetric if it is same when we take the mirror image of it. From these two trees, the first one is symmetric, but second one ... Read More

Program to check whether two trees can be formed by swapping nodes or not in Python

Arnab Chakraborty

Arnab Chakraborty

Updated on 21-Oct-2020 11:50:02

172 Views

Suppose we have two trees, we have to check whether we can transform first tree into second one by swapping any node's left and right subtrees any number of times.So, if the input is likethen the output will be TrueTo solve this, we will follow these steps −que1 := a ... Read More

Program to check whether each node value except leaves is sum of its children value or not in Python

Arnab Chakraborty

Arnab Chakraborty

Updated on 21-Oct-2020 11:46:21

345 Views

Suppose we have a binary tree, we have to check whether for every node in the tree except leaves, its value is same as the sum of its left child's value and its right child's value or not.So, if the input is likethen the output will be TrueTo solve this, ... Read More

Program to find three unique elements from list whose sum is closest to k Python

Arnab Chakraborty

Arnab Chakraborty

Updated on 21-Oct-2020 11:43:13

238 Views

Suppose we have a list of numbers called nums and another value k, we have to find three unique entries in nums (a, b, c) such that |a + b + c − k| is minimized and return the absolute difference.So, if the input is like nums = [2, 5, ... Read More

Program to check number of triplets from an array whose sum is less than target or not Python

Arnab Chakraborty

Arnab Chakraborty

Updated on 21-Oct-2020 11:40:48

193 Views

Suppose we have a list of numbers called nums and another value target, we have to find the number of triples (i < j < k) that exist such that nums[i] + nums[j] + nums[k] < target.So, if the input is like nums = [−2, 6, 4, 3, 8], target ... Read More

Program to check we can find three unique elements ose sum is same as k or not Python

Arnab Chakraborty

Arnab Chakraborty

Updated on 21-Oct-2020 11:38:38

105 Views

Suppose we have a list of numbers called nums and another value k, we have to check whether we can find three unique elements in the list whose sum is k.So, if the input is like nums = [11, 4, 6, 10, 5, 1] k = 20, then the output ... Read More

Advertisements