Largest subarray with frequency of all elements same
Given an array arr[] of N integers, the task is to find the size of the largest subarray with frequency of all elements the same....
read more
Find the smallest after deleting given elements
Given an array of integers, find the smallest number after deleting given elements. In case of repeating elements, we delete one instance (from the original array) for every instance present in the array containing elements to be deleted....
read more
Most similar string
Given a string str and an array of strings arr[] of size N, the task is to print a string from arr[], which has maximum count of matching characters with str....
read more
Walmart Labs Interview Experience | Set 2 (On-Campus)
1st round (Written Test)...
read more
C Program to check if two given strings are isomorphic to each other
Given two strings str1 and str2, the task is to check if the two given strings are isomorphic to each other or not....
read more
Count substrings of a given string whose anagram is a palindrome
Given a string S of length N containing only lowercase alphabets, the task is to print the count of substrings of the given string whose anagram is palindromic....
read more
Minimum insertions to form a palindrome with permutations allowed
Given a string of lowercase letters. Find minimum characters to be inserted in the string so that it can become palindrome. We can change the positions of characters in the string....
read more
Partition string into two substrings having maximum number of common non-repeating characters
Given a string str, the task is to find the maximum count of common non-repeating characters that can be obtained by partitioning the given string into two non-empty substrings....
read more
Find the elements appearing even number of times in an Array
Given an array arr[] consisting of N positive numbers in the range [1, N], the task is to print the array elements which appear even number of times in the given array....
read more
Maximum distance between two elements whose absolute difference is K
Given an array arr[] and a number K, the task to find the maximum distance between two elements whose absolute difference is K. If it is not possible to find any maximum distance then print “-1”....
read more
Maximum Balanced Subsequence Score
Given a stock’s prices for the past n days in the array stockPrice. Choose a subsequence (an ordered subset of an array’s elements) of stock prices, called chosenDays, such that the chosen subsequence of stock prices is balanced. The score of the chosen subsequence is the sum of stock prices on the chosen days. Find the maximum possible score that can be obtained by choosing an optimally balanced subsequence. The subsequence of stock prices is balanced if the following condition holds, stockPrice[chosenDays[i]]-stockPrice[chosenDays[i-1]] = chosenDays[i]-chosenDays[i – 1], for i > 0....
read more
Check if encrypted information remains confidential during its Validity Period
Given an array key of size n, instruction count representing the number of keys a hijacker can test per second, during a total validity period which is the average time to find a message key, determine if the encrypted information remains confidential throughout its validity period. Each function will return two items of information as integers:...
read more