Skip to content

Tag Archives: interview-preparation

Given a Binary Tree consisting of N nodes, the task is to find the length of the longest path from any node to the bottom… Read More
Given an array arr[] consisting of N integers, where the ith element represents the range of a sprinkler i.e [i-arr[i], i+arr[i]] it can water, the… Read More
Given the head of the linked list representing a positive integer, the task is to print the updated linked list after subtracting 1 from it.… Read More
Given an array arr[] consisting of N positive integers such that arr[i] represents that the ith bag contains arr[i] diamonds and a positive integer K,… 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 an array arr[] consisting of N positive integers representing the weights of N items and a positive integer D, the task is to find… 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 a string S of size N, consisting of digits [0 – 9] and character ‘.’, the task is to print the string that can… Read More
Given a string S and integers P and Q, which denotes the cost of removal of substrings “ab” and “ba” respectively from S, the task… Read More
Given an array arr[] of size N, the task is to rearrange the array elements such that all the Prime numbers are placed before the… Read More
Given two Stacks S1 and S2, the task is to check if both the stacks are equal or not in the same order without losing… Read More