
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
5K+ Views
Suppose we have an array of integers. We have to find the length of the longest consecutive elements sequence. So if the input is like [100, 4, 250, 1, 3, 2], answer will be 4, as the longest consecutive sequence is [1, 2, 3, 4].To solve this, we will follow ... Read More

Arnab Chakraborty
932 Views
Suppose we have one non-empty binary tree. We have to find the path sum. So here, a path is any sequence of nodes from some starting node to any node in the where the parent-child connections are present. The path must contain at least one node and does not need ... Read More

Arnab Chakraborty
197 Views
Suppose we have strings S and T. We have to count number of distinct sequences of S which is equal to T.We know that a subsequence of a string is a new string which is formed from the original string by removing some (can be none) of the characters without ... Read More

Arnab Chakraborty
338 Views
Suppose we have one binary search tree, now consider two elements of this BST is swapped, so we have to recover this binary search tree.So if the given tree is like below (first one), the recovered tree will be (second one) −To solve this, we will follow these steps −Define ... Read More

Arnab Chakraborty
492 Views
Suppose we have three strings s1, s2 and s3. Then check whether s3 is formed by interleaving s1 and s2 or not. So if the strings are “aabcc”, s2 = “dbbca”, and s3 is “aadbbcbcac”, then the result will be true.To solve this, we will follow these steps −Define one ... Read More

Arnab Chakraborty
427 Views
Suppose we have a 2D binary matrix where 0s and 1 values are present. We have to find the largest rectangle containing only 1s and return its area.To solve this, we will follow these steps−Define a function called getAns, this will take array acreate stack st, i := 0, ans ... Read More

Arnab Chakraborty
680 Views
Suppose we have a string S and T. We have to find the minimum window in S which will contain all the characters in T. So if the input is like “ABHDAXCVBAGTXATYCB” and T = “ABC”, then the result will be: “CVBA”.To solve this, we will follow these steps −Create ... Read More

Arnab Chakraborty
503 Views
Suppose we have two words word1 and word2, we have to find the minimum number of operations required to concert from word1 to word2. The operations can be of three types, these are insert a character, delete a character and replace a character. So if the input strings are “evaluate” ... Read More

Arnab Chakraborty
2K+ Views
Suppose we have an array of words and a width maxWidth, we have to format the text such that each line has exactly maxWidth number of characters and is fully justified. We should pack our words in a greedy approach; so that is, pack as many words as we can ... Read More

Arnab Chakraborty
2K+ Views
Suppose we have a set of non-overlapping intervals; we have to insert a new interval into the intervals. We can merge if necessary. So if the input is like − [[1, 4], [6, 9]], and new interval is [2, 5], then the output will be [[1, 5], [6, 9]].To solve ... Read More