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
504 Views
Suppose we have an array called nums and a value k. Consider the score of a subarray (i, j) is defined as minimum of subarray nums[i..j] * (j-i+1). Now, a good subarray is a subarray where i -1 and nums[i] >= minNum, doi := i - 1while j < ... Read More
Arnab Chakraborty
344 Views
Suppose we have an array called nums and another value k. The XOR of a segment [left, right] (left 0, thenfor each index j and value prev in dp, donew_dp[i XOR j] := maximum of new_dp[i XOR j] and prev+cntdp := new_dpreturn size of nums - new_dp[0]ExampleLet us see ... Read More
Arnab Chakraborty
180 Views
Suppose, we are given a weighted, undirected graph. We have to implement a function query that takes two vertices and a cost 'limit' as input and checks if there exists a lower cost path than the cost given as input. We return true if there exists a path or otherwise, ... Read More
Arnab Chakraborty
158 Views
Suppose we have a text. We have to find the largest possible k such that there exists a[1], a[2], ..., a[k] such that: Each a[i] is a string which is not blank. And their concatenation a[1] + a[2] + ... + a[k] is equal to the given text; For all ... Read More
Arnab Chakraborty
250 Views
Suppose we have an array nums, we have to split the array into some number of partitions, and individually sort each of them. Now after concatenating them we will get one sorted array. We have to find the maximum number of partitions we could have made?So, if the input is ... Read More
Arnab Chakraborty
345 Views
Suppose, there is an array 'nums' of size n containing positive integers. We have another array 'queries' that contain integer pairs (pi, qi). For every query in the array queries, the answer will be the sum of numbers in the array nums[j] where pi
Arnab Chakraborty
188 Views
Suppose we have two strings, s and t. We want to make a string in the following manner −Select some non-empty subsequence sub1 from s.Select some non-empty subsequence sub2 from t.Concatenate sub1 and sub2, to make the string.We have to find the length of the longest palindrome that can be ... Read More
Arnab Chakraborty
573 Views
Suppose, there are n number of candies and k bags in which the candies have to put into. We have to find out the number of possible ways the candies can be distributed so that each bag contains at least one candy. Every candy in this scenario is unique, so ... Read More
Arnab Chakraborty
160 Views
Suppose we have a starting points (sx, sy), and target point (tx, ty), we have to check whether a sequence of moves exists from the start point to the end point. Here move consists of taking a point (x, y) and transforming it to either (x, x+y) or (x+y, y).So, ... Read More
Arnab Chakraborty
256 Views
Suppose we have two strings s and t. These two strings are K-similar if we can swap the positions of two letters in s exactly K times so that the resulting string is t. So, we have two anagrams s and t, we have to find the smallest K for ... Read More