All Hard Articles

## Calculate MDAS Factorial of given number 4

Given an integer N, the task is to find the MDAS factorial. The general factorial of a no. N is given by : Factorial(N) =… Read More »

## Symantec Interview Experience Pune 4

Round 1:Online Test The Online round was hosted by HackerRank. There was a total of 22 questions. The time given was 1 ½ hours. Every… Read More »

## Merge two BSTs with constant extra space 4.6

Given two Binary Search Trees(BST), print the elements of both BSTs in sorted form. Note: Both the BSTs will not have any common element. Examples:… Read More »

## Queries to find the first non-repeating character in the sub-string of a string 4

Given a string str, the task is to answer Q queries where every query consists of two integers L and R and we have to… Read More »

## Minimum rotations required to get the same String | Set-2 4

Given a string, we need to find the minimum number of rotations required to get the same string. In this case, we will only consider… Read More »

## Subset with sum closest to zero 4

Given an array ‘arr’ consisting of integers, the task is to find the non-empty subset such that its sum is closest to zero i.e. absolute… Read More »

## Maximum water that can be stored between two buildings 4

Given an integer array which represents the heights of N buildings, the task is to delete N-2 buildings such that the water that can be… Read More »

## 0-1 knapsack queries 4

Given an integer array W[] consisting of weights of the items and some queries consisting of capacity C of knapsack, for each query find maximum… Read More »

## Algorithms Sample Questions | Set 3 | Time Order Analysis 4

Question 1: What is the asymptotic boundary of T(n)? θ( n*log(n) ) θ( n2 ) θ( n ) θ( n*log2(n) ) θ( n2*log2(n) ) Answer:… Read More »

## Fibonacci Power 4

Given a number n. You are required to find ( Fib(n) ^ Fib(n) ) % 10^9 + 7, where Fib(n) is the nth fibonacci number.… Read More »

## Number of subsets with zero sum 4

Given an array ‘arr’ consisting of integers, the task is to find the number of subsets such that their sum is equal to zero. Empty… Read More »

## Sum of maximum of all subarrays | Divide and Conquer 4.2

Given an array arr[] of length N, the task is to find the sum of the maximum elements of every possible sub-array of the array.… Read More »

## Maximum sum in an array such that every element has exactly one adjacent element to it 4

Given an array arr[] of N integers, you can select some indexes such that every selected index has exactly one other selected index adjacent to… Read More »

## Python | Download YouTube videos using youtube_dl module 4.2

Each and every day, you must be watching some video or another on YouTube which may be related to Music, Movies, Studies, Research, Leisure etc.… Read More »

## Adobe Interview Experience | MTS-1 4

1. Online Assessment Test (HackerRank) a. 15 aptitude questions (15 mins) b. 5 input-output programs (15 mins) c. 2 programming questions (45 mins)   2.… Read More »

## Queries for bitwise AND in the index range [L, R] of the given array 4

Given an array arr[] of N and Q queries consisting of a range [L, R]. the task is to find the bit-wise AND of all… Read More »

## Distinct palindromic sub-strings of the given string using Dynamic Programming 4

Given a string str of lowercase alphabets, the task is to find all distinct palindromic sub-strings of the given string. Examples: Input: str = “abaaa”… Read More »

## Minimize the number of steps required to reach the end of the array 4.5

Given an integer array arr[] of length N consisting of positive integers, the task is to minimize the number of steps required to reach the… Read More »

## Check whether a number can be represented as sum of K distinct positive integers 4

Given two integers N and K, the task is to check whether N can be represented as sum of K distinct positive integers. Examples: Input:… Read More »

## Minimum number of sub-strings of a string such that all are power of 5 4

Given a binary string str. The task is to find the smallest positive integer C such that the binary string can be cut into C… Read More »