You are given two stacks S1 and S2. You have to pic numbers from stack by deleting top element and add them in the resultant sum. The element deleted must be added into the sum. The sum must not exceed the given value of K. Number of elements picked is called score.
You are given an array A of size n and an integer K. You have to count the number of consecutive subsequences of the array A whose elements’ sum is divisible by K.
You are give two strings s and t as input. Objective is to convert s into t by using following two operations only:
1. Append a lowercase English alphabetic letter to the end of the string.
2. Delete the last character in the string. Performing this operation on an empty string results in an empty string.
You have to convert s into t by performing exactly K number of operations.
We are give few containers containing balls of different colors. We can exchange same number of balls between any two containers. Can we reorganize the balls in containers in such a ways, so that all the containers have all balls in it of same color?
Given array of size n is right rotated k times. Find out the element at ith position in the resultant array. The original “Circular Array Rotation” problem statement is available and Hackerrank.