I went for face to face interview and faced following questions....
Given a string S consisting of N lowercase alphabets and an array of pairs of characters P[][2], the task is to modify the given string S by replacing all occurrences of character P[i][0] with character P[i][1]....
Given an array arr[] of size N, the task is to check if it is possible to split the array arr[] into different subsequences of equal size such that each element of the subsequence are equal. If found to be true, then print “YES”. Otherwise, print “NO”....
Given an array of strings arr[] containing N words, the task is to print all possible palindromic string by combining any two strings from the given array....
Given an array arr[] of N elements, the task is to check whether the array have all same (identical) elements or not without using the loop. If all elements are same then print Yes otherwise print No....
Given a string, count all distinct substrings of the given string....
Given an array of size N filled with numbers from 1 to N-1 in random order. The array has only one repetitive element. The task is to find the repetitive element....
Given an array arr[] of size n containing 0 and 1 only. The problem is to count the subarrays having an equal number of 0’s and 1’s....
Find and print the uncommon characters of the two given strings in sorted order. Here uncommon character means that either the character is present in one string or it is present in another string but not in both. The strings contain only lowercase characters and can contain duplicates. Source: Amazon Interview Experience | Set 355 (For 1 Year Experienced)...
Given an array of strings arr[], consisting of strings made up of lowercase and uppercase letters, the task is to print all the strings from the given array that can be typed using keys from a single row of a QWERTY keyboard....
Given a sequence of n numbers. The task is to count all the subsets of the given set which only have even numbers and all are distinct....
Given an array arr[] of size N, the task is to count the number of pairs from the given array whose product contains only a single distinct prime factor....