## Count elements in Array having strictly smaller and strictly greater elements present

Prabhdeep Singh

Updated on 31-Aug-2023 12:01:24

17 Views

A number is strictly a smaller element means the number should be less than by a minimum difference is 1 and similarly strictly greater element means the number should be greater than by a minimum of difference 1. Here we have given an array of integers of size n and ... Read More

## Minimize operations to convert K from 0 to B by adding 1 or A * 10^c in each step

Prabhdeep Singh

Updated on 31-Aug-2023 11:59:45

20 Views

We are given an integer B and A, and we have to convert the number K from 0 to exactly B by applying the given operations in the minimum steps. We can increase the current number K by 1 i.e. K = K + ... Read More

## Minimize cost to reduce Array if for choosing every 2 elements, 3rd one is chosen for free

Prabhdeep Singh

Updated on 31-Aug-2023 11:51:21

15 Views

We are given an array it this problem and we have to remove all the elements of the array with the minimum cost required. We have to remove two elements at a time and add them to the total cost. Also, we can remove the third number without any cost ... Read More

## Find the index at which bit must be set to maximize the distance between the next set bit

Prabhdeep Singh

Updated on 31-Aug-2023 11:45:28

11 Views

We are given an array that contains the binary numbers that are '0', and '1' only. We have to make a one-bit set of the given array which was earlier not the set bit (there will be at least a bit present in the given array which will not be ... Read More

## Find the winner of the game where X picks 1, then Y picks 2, then X picks 3, and so on

Prabhdeep Singh

Updated on 31-Aug-2023 11:32:33

10 Views

There are two players, X and Y, who are playing a game. X will start the first and can pick 1 stone from the set of an unlimited number of stones after that Y will start and can pick the 2 stones, then X will pick 3, and so on ... Read More

## Minimize the count of peaks and troughs in the given Array after at most one replacement

Prabhdeep Singh

Updated on 31-Aug-2023 11:17:11

12 Views

Peaks are defined as the point or index in the array where are both left and right sides values are smaller than the value of that index. And Troughs are defined as the point or index of the array where are both left and right sides values are greater than ... Read More

## Check if string A can be converted to string B by changing A[i] to A[i+1] or A[i]..A[i+K-1] to A[i]+1 each

Prabhdeep Singh

Updated on 31-Aug-2023 11:10:08

15 Views

We are given two strings and we have to check if it is possible to convert the first string to another by performing any number of times a particular given task. The tasks that can be performed on the given first string only and the tasks are: ... Read More

## Find Binary String of size at most 3N containing at least 2 given strings of size 2N as subsequences

Prabhdeep Singh

Updated on 31-Aug-2023 10:55:25

16 Views

We are given three strings of equal size equal to 2*N, where N is an integer. We have to create a string of the size 3*N and at least two strings from the given strings be the subsequence of it. Also, the given strings are binary strings which means they ... Read More

## Count of setbits in bitwise OR of all K length substrings of given Binary String

Prabhdeep Singh

Updated on 31-Aug-2023 10:52:49

17 Views

Set bits are the bits in the binary representation of the number which are '1'. The binary representation of the number contains only two digits '1' and '0', also it may be present in the form of a string. We are given a string, the binary representation of a given ... Read More

## Longest Common Subsequence with no Repeating Character

Prabhdeep Singh

Updated on 31-Aug-2023 10:31:28

26 Views

In a string, a subsequence is a string that can be formed by deleting some character from it which means it contains some character from the string may be all or none and all will be present in the same order of the string. Among two strings we have to ... Read More