Arnab Chakraborty has Published 4452 Articles

Program to Find K-Largest Sum Pairs in Python

Arnab Chakraborty

Arnab Chakraborty

Updated on 15-Dec-2020 13:09:00

156 Views

Suppose, we have been provided with two lists of numbers that are nums0 and nums1, and an integer k. Our goal is to find the k largest sum pairs where each pair contains one integer in nums0 and another in nums1. The sum of all of the pairs has to ... Read More

Program to Find the Inverted Inversions in Python

Arnab Chakraborty

Arnab Chakraborty

Updated on 15-Dec-2020 13:06:52

102 Views

Suppose we have been provided with a list of numbers nums. We have to find the number of existing quadruplets (a, b, c, d) such that a < b < c < d and nums[a] < nums[b] and nums[c] > nums[d].The array nums is a permutation of the integers 1...NSo, ... Read More

Program to Find Out the Edges that Disconnect the Graph in Python

Arnab Chakraborty

Arnab Chakraborty

Updated on 15-Dec-2020 13:04:55

232 Views

Suppose we have been provided with an undirected graph that has been represented as an adjacency list, where graph[i] represents node i's neighbor nodes. We have to find the number of edges that satisfies the following condition.If the edge is removed, the graph becomes disconnected.So, if the input is like ... Read More

Program to Find Out the Occurrence of a Digit from a Given Range in Python

Arnab Chakraborty

Arnab Chakraborty

Updated on 15-Dec-2020 13:01:25

663 Views

Suppose we have been provided with two positive integers n and d where d is a digit within 0 to 9. We have to determine how many times the digit d appears within the integer numbers between 1 and n.So, if the input is like n = 45, d = ... Read More

Program to Find Out Currency Arbitrage in Python

Arnab Chakraborty

Arnab Chakraborty

Updated on 15-Dec-2020 13:00:12

948 Views

Suppose we have one N x N table of currency exchange rates. We have to check whether there is some sequence of trades we can make or not. Now starting with some amount A of any currency, we can end up with some amount greater than A of that currency. ... Read More

Program to Connect a Forest in Python

Arnab Chakraborty

Arnab Chakraborty

Updated on 15-Dec-2020 12:57:59

123 Views

Suppose we have graphs as an adjacency lists. This graph is actually a set of disjoint trees. We have to add a certain number of edges to the forest such that it becomes a single tree. We have to return the minimum distance possible of the longest path between any ... Read More

Program to Find Out the Best Interval to Remove in C++

Arnab Chakraborty

Arnab Chakraborty

Updated on 15-Dec-2020 12:54:00

136 Views

Suppose we have a list of intervals (inclusive) that are potentially overlapping. Now consider there is an operation where we delete one interval, then merge the remaining intervals and then count the number of intervals left over. We have to find the maximum number of leftover intervals possible after removal.So, ... Read More

Program to find out the efficient way to study in Python

Arnab Chakraborty

Arnab Chakraborty

Updated on 15-Dec-2020 12:51:27

71 Views

Suppose, we have three lists whose lengths are same. These are deadlines, credits, and durations. They are representing course assignments. For the iβˆ’th assignment deadlines[i] shows its deadline, credits[i] shows its credit, and durations[i] shows the number of days it takes to finish the assignment. One assignment must be completed ... Read More

Program to find maximum value by inserting operators in between numbers in Python

Arnab Chakraborty

Arnab Chakraborty

Updated on 15-Dec-2020 12:49:50

246 Views

Suppose we have a list of numbers called nums, we have to find the maximal value that can be generated by adding any binary operators like +, βˆ’, and * between the given numbers as well as insert any valid brackets.So, if the input is like nums = [βˆ’6, βˆ’4, ... Read More

Program to find number of ways we can concatenate words to make palindromes in Python

Arnab Chakraborty

Arnab Chakraborty

Updated on 15-Dec-2020 12:47:31

110 Views

Suppose we have a list of distinct words, we have to find the number of different ways we can concatenate two different words from the given list of words to make a palindrome.So, if the input is like words = ["time", "emit", "mo", "m"], then the output will be 3, ... Read More

Advertisements