Problem 49

Median :

Problem 50

Matrix Sum :

Problem 51

Count Element :

Problem 52

Delete Non Repeat :

Problem 53

Multiply Number :

Problem 54

Pyramid of alphabets


Problem 55

You have to encrypt a non-empty string phrase. The encryption adds a ‘cyclic shift’ to each
letter where the value of this ‘cyclic shift’ is decided by the position of the letter from the end of
its word. The shift value for each letter of a word is its index value (starting from 0) from the
right-most character of the word.
The shift values in ‘yum feed’ will be
yum: m->0, u->1, y->2
feed: d->0, e->1, e->2, f->3
which gives the encryption avmigfd
Here, adding the shift with value 0 to letter ‘m’ gives ‘m’ + 0 = m;
values 1 to ‘u’ gives ‘u’ + 1 = v and values 2 to ‘y’ gives ‘y’ + 2 = a and so on
Note that the shift wraps around on reaching the end of the alphabets, i.e., the shift values for
‘y’ as shown above is ‘a’.
The input to the function/method consists of a string.
Return the encrypted string
Assume that the input string contains single space separating set of words

Problem 56

The LeastRecentlyUsed(LRU) cache algorithm exists the element from the cache(when it’s full)
that was leastrecentlyused. After an element is requested from the cache, it should be added to
the cache(if not already there) and considered the most recently used element in the cache.
Initially, the cache is empty. The input to the function LruCountMiss shall consist of an integer
max_cache_size, an array pages and its length len. The function should return an integer for the
number of cache misses using the LRU cache algorithm. Assume that the array pages always
has pages numbered from 1 to 50.
Input: 3 16 7 0 1 2 0 3 0 4 2 3 0 3 2 1 2 0
Expected Return Value: 11
Input:2 9 2 3 1 3 2 1 4 3 2
Expected Return Value: 8

Problem 57

Half sort Array:

Problem 58

Given a string str, write a program to eliminate all the vowels from the given string. The list of
vowels in the English alphabet is : {a,e,i,o,u,A,E,l,0.U}. The Input to the function
eliminateVowelString shall consist of a string str (containing only English letters) and returns a
pointer to a string which does not contain vowels.
Input =”abcdefghijklmnopqrstuvwxyz”
strlen() is used to calculate the length of the string. The statement –
int len = strlen(str); Returns the length of the string str
Input: “bacdefghijklmnopgrstu”
Expected Return Value: “bcdfghjklmnpqrst”
Input: “bacdcfgh”
Expected Return Value: “bcdlgh”

Problem 59

The function sameelementcount(int *arr,intlen)accepts an integer array arr of length len as a
input and returns the number of elements in an arr which are even numbers and equal to the
element to its right

Problem 60

Print the following Pattern
1 2 1
1 2 3 2 1
1 2 3 4 3 2 1

Problem 61

Return the difference between two given times in seconds
Time:1:58:42, Time:2:1:45
Expected Return values:
Testcase 2
Time:3:49:57, Time:2:45:57
Expected Return Values

Problem 62

The function findMaxElement(int *arr1,int len1,int *arr2,int len2) accepts two integer arrays
arr1,arr2 of length len1,len2 respectively. It is supposed to return the largest element in both the
input arrays. Another function sortArray(int *arr,intlen) sorts the input array arr of length len
in ascending order and returns the sorted array.
Your task is to use sortArray(int *arr,intlen) function and complete the code in
findMaxElement(int *arr1,int len1,int *arr2,int len2) so that it passes all test cases.
[2, 5, 1, 3, 9, 8, 4, 6, 5, 2, 3, 11], 12,
[11, 13, 2, 4, 15, 17, 67, 44, 2, 100, 0, 23]11
Expected Return Value:
[100, 22, 43, 912, 56, 89, 85], 7, [234, 123, 456, 234, 890, 101], 6
Expected Return Value: