
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Arnab Chakraborty has Published 4293 Articles

Arnab Chakraborty
672 Views
Suppose we have directed graph, with nodes labelled 0, 1, ..., n-1. In this graph, each edge is colored with either red or blue colors, and there could be self-edges or parallel edges. Each [i, j] in red_edges indicates a red directed edge from node i to node j. Similarly, ... Read More

Arnab Chakraborty
170 Views
Suppose we have a rooted binary tree, we have to return the lowest common ancestor of its deepest leaves. We have to keep in mind that −The node of a binary tree is a leaf node if and only if it has no childrenThe depth of the root of the ... Read More

Arnab Chakraborty
182 Views
Suppose we have the root of a binary tree; we have to find the maximum average value of any subtree of that tree. So if the tree is like −The output will be 6, this is because, for node 5, it will be (5 + 6 + 1)/ 3 = ... Read More

Arnab Chakraborty
239 Views
Suppose we have a binary tree, we have to find the sum of values of its deepest leaves. So if the tree is like −Then the output will be 15.To solve this, we will follow these steps −Define a map m, and maxDepthDefine a recursive method solve(), this will take ... Read More

Arnab Chakraborty
577 Views
Suppose we have a string s, we have to find the maximum number of occurrences of any substring that satisfies the following rules −The number of distinct characters in the substring must be less than or equal to maxLetters.The substring size must be in range minSize and maxSize inclusive.So if ... Read More

Arnab Chakraborty
314 Views
Suppose we have to create an iterator that iterates through a run-length encoded sequence. Here the iterator is initialized by calling RLEIterator(int[] A), where A is a run-length encoding of a sequence. So we can say that for all even i, A[i] tells us the number of times that the ... Read More

Arnab Chakraborty
221 Views
Suppose in an infinite binary tree where every node has two children, the nodes are labelled in row order. Now in the odd numbered rows (the first, third, fifth, ...), the labelling is left to right, and in the even numbered rows (second, fourth, sixth, ...), the labelling is right ... Read More

Arnab Chakraborty
213 Views
Suppose we have a m x n matrix mat and an integer threshold. We have to the maximum side-length of a square with a sum less than or equal to the given threshold or return 0 if there is no such square. So if the input is like −113243211324321132432113243211324321132432And threshold ... Read More

Arnab Chakraborty
133 Views
Suppose in a social group, there are N different people, with unique integer ids from 0 to N-1. Here we have a list of logs, where each logs[i] = [time, id_A, id_B] contains a non-negative integer timestamp, and the ids of two different people. Each log is showing the time ... Read More