Arnab Chakraborty has Published 3734 Articles
Arnab Chakraborty
587 Views
Suppose we have a binary matrix. We have to count the number of islands in it. An island is place that is surrounded by water and is formed by connecting adjacent lands horizontally or vertically. We can assume that all four edges of the grid are all surrounded by water.Suppose ... Read More
Arnab Chakraborty
276 Views
Suppose we have an array with n numbers, we have to return the number of consecutive zero’s at the end after multiplying all the n numbers.So, if the input is like [200, 20, 5, 30, 40, 14], then the output will be 6 as 200 * 20 * 5 * ... Read More
Arnab Chakraborty
656 Views
Suppose we have one equation in this form: a + b = c, now any one of the terms of a, b or c is missing. We have to find the missing one.So, if the input is like ? + 4 = 9, then the output will be 5To solve ... Read More
Arnab Chakraborty
175 Views
Suppose there are n number of cashiers exchanging the money, at the moment, the i-th cashier had ki number of people in front of him/her. Now, the j-th person in the line to i-th cashier had m[i, j] notes. We have to find how early can one exchange his/her notes. ... Read More
Arnab Chakraborty
267 Views
Suppose we have a balanced binary search tree, we have to create a function named is_valid_triplet() that returns true when there exist a triplet in given BST whose sum equals to 0, otherwise returns false. Design the method by following these constraints −expected time complexity is O(n^2)O(logn) extra space can ... Read More
Arnab Chakraborty
228 Views
Suppose we have a list of tickets represented by pairs of departure and arrival airports like [from, to], we have to find the itinerary in order. All of the tickets belong to a man who departs from Chennai. So, the itinerary must begin with Chennai.So if the input is like ... Read More
Arnab Chakraborty
278 Views
Suppose we have a list of N jobs where each job has three parameters. 1. Start Time 2. Finish Time 3. Profit We have to find a subset of jobs associated with maximum profit so that no two jobs in the subset overlap.So, if the input is like N = ... Read More
Arnab Chakraborty
608 Views
Suppose we have a binary search tree and a value K as input, we have to find K-th smallest element in the tree.So, if the input is likek = 3, then the output will be 15.To solve this, we will follow these steps −Define a function find_kth_smallest(), this will take ... Read More
Arnab Chakraborty
242 Views
Suppose we have a RAM and that RAM is organized in blocks. there are multiple processes running on the system. We have to keep in mind that every process gets following information, (Thread T, Memory Block M, time t, R/W) This indicates the thread T was implementing memory block M ... Read More
Arnab Chakraborty
418 Views
Suppose we have following flow network. As we know an s-t cut is a cut that requires the source s node and a sink t node to be in different subsets, and it includes edges going from the source set to the sink side. Here the capacity of an s-t ... Read More
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP