Skip to content

Tag Archives: Amazon-Question

Given an array arr[] consisting of N integers and an integer R, denoting the cutoff rank, the task is to count the number of array… Read More
Rahul and Ankit are the only two waiters in the Royal Restaurant. Today, the restaurant received N orders. The amount of tips may differ when… Read More
Given an array arr[] consisting of N positive integers, such that arr[i] represents the number of products the ith supplier has and a positive integer,… Read More
Given a positive integer K and an array arr[] consisting of N positive integers, such that arr[i] is the number of processes ith processor can… Read More
Given a string S consisting of N characters (representing the tasks to perform) and a positive integer K, the task is to find the minimum… Read More
Given an integer N denoting the number of connected cities ( numbered from 1 to N ) and a 2D array arr[][] consisting of pairs… Read More
Given a grid mat[][] of size M * N, consisting of only 0s, 1s, and 2s, where 0 represents empty place, 1 represents a person… Read More
Given three positive integers, L, R, K and an array arr[] consisting of N positive integers, the task is to count the number of ways… Read More
Given a string S and an integer K, the task is to generate lexicographically the largest string possible from the given string, by removing characters… Read More
Given binary string str, the task is to find the minimum number of characters required to be flipped to make all 1s in right and… Read More
Given an array of strings Q[], consisting of queries of the following types: “WRITE X”: Write a character X into the document. “UNDO”: Erases the… Read More
Given an array of intervals arr[] of size N, the task is to find the Kth smallest element among all the elements within the intervals… Read More
Given a matrix bricks[][] denoting the start and end coordinates of a brick’s breadth from an arrangement of rectangular bricks in a two-dimensional space. A… Read More
Given two arrays A[] and B[], the task is to find the maximum number of uncrossed lines between the elements of the two given arrays.… Read More
Given two positive integers L and R, the task is to count the total number of set bits in the binary representation of all the… Read More