🎙 Asked in Google
🎙 Asked in Google
Given three strings A, B and C. Write a function that checks whether C is an interleaving of A and B. C is said to be interleaving A and B, if it contains all and only characters of A and B and order of all characters in individual strings is preserved.
coding wallah
March 08, 2023
🎙 Asked in Google
Given an array that contains both positive and negative integers, find the product of the maximum product subarray.
coding wallah
March 05, 2023
🎙 Asked in Google
Given an array of N non-negative integers arr[] representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining.
coding wallah
March 04, 2023
🎙 Asked in Google
Given a string consisting of opening and closing parenthesis, find the length of thelongest valid parenthesis substring.
coding wallah
March 03, 2023
🎙 Asked in Google
Given a binary matrix, find the maximum size rectangle binary-sub- matrix with all 1's.
coding wallah
March 03, 2023
🎙 Asked in Google
Find the largest rectangular area possible in a given histogram where the largest rectangle can be made of a number of contiguous bars whose heights are given in an array. For simplicity, assume that all bars have the same width and the width is 1 unit.
coding wallah
March 03, 2023
🎙 Asked in Google
In a party of N people, only one person is known to everyone. Such a person may be present at the party, if yes, (s)he doesn't know anyone at the party. We can only ask questions like "does A know B? ". Find the stranger (celebrity) in the minimum number of questions.
coding wallah
March 03, 2023
🎙 Asked in Google
Given a sorted dictionary (array of words) of an alien language, find order of characters in the language.
coding wallah
February 27, 2023
🎙 Asked in Google
Given a Linked List and a number N, write a function that returns the value at the Nth node from the end of the Linked List.
coding wallah
February 27, 2023
🎙 Asked in Google
Given string str, the task is to find the minimum number of characters to be inserted to convert it to a palindrome.
coding wallah
February 25, 2023
🎙 Asked in Google
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.s
coding wallah
February 25, 2023
🎙 Asked in Google
Given two positive integers M and K, find the maximum integer possible by doing at-most K swap operations on its digits.
coding wallah
February 24, 2023
🎙 Asked in Google
Given two positive numbers strings. The numbers may be very large (may not fit in long long int), the task is to find product of these two numbers.
coding wallah
February 24, 2023
🎙 Asked in Google
Given an array arr[] of size N and an integer K, the task is to find all the array elements that appear more than (N /K) times.
coding wallah
February 24, 2023
🎙 Asked in Google
Given an array arr[] of size N and an integer K, the task is to find all the array elements that appear more than (N /K) times.
coding wallah
February 23, 2023
🎙 Asked in Google
Given an integer array having distinct elements, find the surpasser count for each element in it. In other words, for each array element, find the total number of elements to its right, which are greater than it.
coding wallah
February 23, 2023
🎙 Asked in Google
Given an array where every element Occurs three times, except one element which occurs only once. Find the element that occurs once. The expected time complexity is O(n) and O(1) extra space.
coding wallah
February 23, 2023
🎙 Asked in Google
Given an array arr[] of size N. The task is to find the sum of the contiguous subarray within a arr[] with the largest sum.
coding wallah
February 23, 2023