# Tag Archives: SAP Labs

Given an array of distinct integers and a sum value. Find count of triplets with sum smaller than given sum value. The expected Time Complexity… Read More
Given an array of distinct integers and a sum value. Find count of triplets with sum smaller than given sum value. The expected Time Complexity… Read More
Given an array of distinct integers and a sum value. Find count of triplets with sum smaller than given sum value. The expected Time Complexity… Read More
Write a function rotate(ar[], d, n) that rotates arr[] of size n by d elements.   Rotation of the above array by 2 will make array … Read More
Example: Let the input string be “i like this program very much”. The function should change the string to “much very program this like i”… Read More
Example: Let the input string be “i like this program very much”. The function should change the string to “much very program this like i”… Read More
Example: Let the input string be “i like this program very much”. The function should change the string to “much very program this like i”… Read More
Example: Let the input string be “i like this program very much”. The function should change the string to “much very program this like i”… Read More
Example: Let the input string be “i like this program very much”. The function should change the string to “much very program this like i”… Read More
Example: Let the input string be “i like this program very much”. The function should change the string to “much very program this like i”… Read More
The cost of a stock on each day is given in an array, find the max profit that you can make by buying and selling… Read More
The cost of a stock on each day is given in an array, find the max profit that you can make by buying and selling… Read More
Given an array A[] consisting 0s, 1s and 2s. The task is to write a function that sorts the given array. The functions should put… Read More
An element in a sorted array can be found in O(log n) time via binary search. But suppose we rotate an ascending order sorted array… Read More
Round 1: Online test Round one consisted of 2 coding questions and 15 multiple choice questions for which we have dedicated 90 mins. Write a… Read More