
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 an array of n elements, and a positive integer s. We have to find the minimal length of a contiguous subarray, of which the sum is greater or equal to s. If there isn’t one, then return 0 instead. So if the array is like [2, 3, ... Read More

Arnab Chakraborty
1K+ Views
Suppose we have an undirected tree; we have to find its diameter − the number of edges in the longest path in that tree is the diameter of that tree. Here tree is given as an edge list where edges[i] = [u, v] is a bidirectional edge between nodes u ... Read More

Arnab Chakraborty
1K+ Views
Suppose we have two integers representing the numerator and denominator of a fraction, we have to find fraction in string format. If the fractional part is repeating, enclose the repeating part in parentheses. So if the numerator is 2 and denominator is 3, then the output will be “0.(6)”To solve ... Read More

Arnab Chakraborty
913 Views
Suppose we have a linked list like l1 -> l2 -> l3 -> l4 -> … -> l(n-1) -> ln. We have to rearrange this list into the form l1 -> ln -> l2 -> l(n - 1) -> … and so on. Here the constraint is that, we cannot ... Read More

Arnab Chakraborty
264 Views
Suppose we have a list, we have to sort this in O(n logn) time using constant space complexity, so if the list is like [4, 2, 1, 3], then it will be [1, 2, 3, 4]To solve this, we will follow these steps −Define a method for merging two lists ... Read More

Arnab Chakraborty
225 Views
Suppose we have a binary tree; we have to flatten it into linked list in place. So if the tree is like −The output tree will be −To solve this, we will follow these steps −ser prev := nullDefine a recursive function solve(), that will take root as input.if root ... Read More

Arnab Chakraborty
748 Views
Suppose we have a binary tree; we have to find the Zigzag level order traversal. So for the first row, scan from left to right, then right to left from the second row, then again left to right and so on. So if the tree is like −The traversal sequence ... Read More

Arnab Chakraborty
4K+ Views
Suppose we have a char array representing tasks CPU need to do. This contains uppercase letters A to Z where different letters represent different tasks. The tasks could be done without original order. Each task could be done in one interval. For each interval, CPU could finish one job or ... Read More

Arnab Chakraborty
256 Views
Suppose we have a sequence of number is called arithmetic if it consists of at least three elements and if the difference between any two consecutive elements is the same. So for example, these are arithmetic sequence: [1, 3, 5, 7, 9], [7, 7, 7, 7], [3, -1, -5, -9], ... Read More

Arnab Chakraborty
337 Views
Suppose we have a positive integer K, we need find the smallest positive integer N such that N is divisible by K, and N only contains the digit 1. We have to find the length of N. If there is no such N, return -1. So if the input is ... Read More