Arnab Chakraborty has Published 4293 Articles

Coin Path in C++

Arnab Chakraborty

Arnab Chakraborty

Updated on 11-Jul-2020 11:40:21

261 Views

Suppose we have an array A (index starts at 1) with N numbers: A1, A2, ..., AN and another integer B. The integer B denotes that from any index is i in the array A, we can jump to any one of the places in the array A indexed i+1, ... Read More

Maximum Average Subarray II in C++

Arnab Chakraborty

Arnab Chakraborty

Updated on 11-Jul-2020 11:36:37

925 Views

Suppose we have an array with n integers, we have to find the contiguous subarray whose length is greater than or equal to k that has the maximum average value. We have to find the maximum average value.So, if the input is like [1, 12, -5, -6, 50, 3], k ... Read More

Maximum Vacation Days in C++

Arnab Chakraborty

Arnab Chakraborty

Updated on 11-Jul-2020 11:33:30

435 Views

Suppose one company wants to give one of its best employees the option to travel among N cities to collect some resources. But employees want some vacations also, we could take vacations in some particular cities and weeks. Our task is to schedule the traveling to maximize the number of ... Read More

Word Abbreviation in C++

Arnab Chakraborty

Arnab Chakraborty

Updated on 11-Jul-2020 11:28:19

1K+ Views

Suppose we have an array of n unique strings, We have to generate minimal possible abbreviations for every word following rules below.Starting with the first character and then the number of characters abbreviated, which followed by the last character.If we find any conflict and that is more than one words ... Read More

Find the final X and Y when they are Altering under given condition in C++

Arnab Chakraborty

Arnab Chakraborty

Updated on 08-Jul-2020 07:33:12

108 Views

Consider we have the initial values of two positive integers X and Y. Find the final value of X and Y, such that there will be some alteration as mentioned below −step1 − If X = 0 and Y = 0 then terminate the process, otherwise go to step2step2 − ... Read More

Check if a Matrix is Invertible in C++

Arnab Chakraborty

Arnab Chakraborty

Updated on 07-Jul-2020 07:40:07

209 Views

Here we will see how to check whether a matrix is invertible or not. If one matrix is M, then the inverted matrix M-1 will be −$$M^-1=\frac{adj(M)}{|M\lvert}$$So if the determinant of M is non-zero, then only we can get the inverse, otherwise, we will not get the inverse of it. ... Read More

RAM Addressing of 8051 Microprocessor

Arnab Chakraborty

Arnab Chakraborty

Updated on 06-Jul-2020 09:27:15

2K+ Views

In this section we will see how external RAM memories can be addressed by the Intel 8051 microcontroller. There are different methods for addressing the RAMs. Now at first we will discuss about some different types of RAM memories in short.The RAM (Random Access Memory) is volatile memory. So when ... Read More

Binary Prefix Divisible By 5 in Python

Arnab Chakraborty

Arnab Chakraborty

Updated on 06-Jul-2020 09:19:15

171 Views

Suppose we have an array A of 0s and 1s, consider N[i] is the i-th subarray from index A[0] to A[i] interpreted as a binary number. We have to find a list of boolean answers, where answer[i] is true if and only if N[i] is divisible by 5.So, if the ... Read More

Powerful Integers in Python

Arnab Chakraborty

Arnab Chakraborty

Updated on 06-Jul-2020 09:17:24

247 Views

Suppose we have two positive integers x and y, we can say an integer is powerful if it is equal to x^i + y^j for some integers i >= 0 and j >= 0. We have to find a list of all-powerful integers that have value less than or equal ... Read More

Largest Time for Given Digits in C++

Arnab Chakraborty

Arnab Chakraborty

Updated on 06-Jul-2020 09:15:09

199 Views

Suppose we have an array of 4 digits, we have to find the largest 24-hour time that can be made. We know that the smallest 24-hour time is 00:00, and the largest time is 23:59. Starting from 00:00, a time is larger if more time has elapsed since midnight. We ... Read More

Advertisements