
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
2K+ Views
Suppose we have a grid, there are few 0s and few 1s. We have to count the number of islands. 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 ... Read More

Arnab Chakraborty
198 Views
Suppose we have a binary tree, if we see the tree from right side, then we can see some elements of it. we have to display those elements. So if the tree is like −To solve this, we will follow these steps −We will create one helping method for dfs. ... Read More

Arnab Chakraborty
2K+ Views
Suppose we want to make one iterator for binary tree. There will be two methods. The next() method to return the next element, and hasNext() method to return Boolean value, that will indicate that the next element is present or not. So if the tree is like −And the sequence ... Read More

Arnab Chakraborty
1K+ Views
Suppose we have an integer array called nums, we have to find the contiguous subarray within an array (containing at least one number) which has the largest product. So if the array is [2, 3, -2, 4], the output will be 6, as contiguous subarray [2, 3] has max product.To ... Read More

Arnab Chakraborty
295 Views
Suppose we have a linked list, we have to perform the insertion sort on this list. So if the list is like [9, 45, 23, 71, 80, 55], sorted list is [9, 23, 45, 55, 71, 80].To solve this, we will follow these steps −dummy := new Node with some ... Read More

Arnab Chakraborty
1K+ Views
Suppose we have a binary tree. We have to return the preorder traversal of that tree. So if the tree is like −Then the preorder traversal will be: [3, 9, 20, 15, 7]To solve this, we will follow these steps −make empty lists called res and st.node := rootwhile node ... Read More

Arnab Chakraborty
367 Views
Consider we have a linked list, and we have to check whether there is any cycle or not. To represent the cycle in the given linked list, we will use one integer pointer called pos. This pos represents a position in the linked list where tail is connected. So if ... Read More

Arnab Chakraborty
313 Views
Suppose we have a 2D board containing X and O. Capture all regions surrounded by X. A region is captured by changing all Os into Xs in that surrounded region.XXXXXOOXXXOXXOXXAfter running the output will beXXXXXXXXXXXXXOXXTo solve this, we will follow these steps −If board is not present, then return blank ... Read More

Arnab Chakraborty
269 Views
Suppose we have given a binary tree in which each node holds an integer key. We have to find the paths that sum to a given value. The path should start from root to leaf. We have to find the path where the sum is same.If the tree is like ... Read More

Arnab Chakraborty
246 Views
Suppose we have the inorder and postorder traversal sequence of a binary tree. We have to generate the tree from these sequences. So if the postorder and inorder sequences are [9, 15, 7, 20, 3] and [9, 3, 15, 20, 7], then the tree will be −Let us see the ... Read More