## Weighted Job Scheduling

Given N jobs where every job is represented by following three elements of it. Start Time Finish Time Profit or Value Associated (>= 0) Find… Read More »

## Intuit Interview Experience | Set 7 (For 3.5 Years Experienced)

1st Round : (2 hrs) 1. Implement LRU Cache, 2. Implement your own Blocking Queue. 3. Questions on Collections , a. How AtomicInteger works b.… Read More »

## Komli Media Interview Experience

I recently attended Komli media interview and wanted to share the experience. First Round(Written) 1. Midas has boxes in three sizes: large, medium, and small.… Read More »

## Print all paths from a given source to a destination

Given a directed graph, a source vertex ‘s’ and a destination vertex ‘d’, print all paths from given ‘s’ to ‘d’. Consider the following directed… Read More »

## Factorial of a large number

Factorial of a non-negative integer, is multiplication of all integers smaller than or equal to n. For example factorial of 6 is 6*5*4*3*2*1 which is… Read More »

## Amazon Interview Experience | Set 167 (SDE I for 1 year 6 months experience)

Round1: Online Coding Round There were 4 coding question. Was asked to answer 2 out of 4. 1) Given a list of N coins, their… Read More »

## Find the missing number in Arithmetic Progression

Given an array that represents elements of arithmetic progression in order. One element is missing in the progression, find the missing number. Examples: Input: arr[]… Read More »

## MAQ Software Interview Experience | Set 5

1st round – 30 min,30 MCQs (IQ test) 2nd round – Coding test(30 min) Q1-> Insertion sort Q2-> Reverse a number using recursion Q3-> Didn’t… Read More »

## Minimize Cash Flow among a given set of friends who have borrowed money from each other

Given a number of friends who have to give or take some amount of money from one another. Design an algorithm by which the total… Read More »

## Given a matrix of ‘O’ and ‘X’, replace ‘O’ with ‘X’ if surrounded by ‘X’

Given a matrix where every element is either ‘O’ or ‘X’, replace ‘O’ with ‘X’ if surrounded by ‘X’. A ‘O’ (or a set of… Read More »

## Suffix Tree Application 6 – Longest Palindromic Substring

Given a string, find the longest substring which is palindrome. We have already discussed Naïve [O(n3)], quadratic [O(n2)] and linear [O(n)] approaches in Set 1,… Read More »

## Sort an array in wave form

Given an unsorted array of integers, sort the array into a wave like array. An array ‘arr[0..n-1]’ is sorted in wave form if arr[0] >=… Read More »

## Write a function that returns 2 for input 1 and returns 1 for 2

Write a function which returns 1 that 2 is passed and return 2 when 1 is passed. Source: Adobe Interview Experience | Set 19 (For… Read More »

## How to check if given four points form a square

Given coordinates of four points in a plane, find if the four points form a square or not. To check for square, we need to… Read More »

## How to check if an instance of 8 puzzle is solvable?

What is 8 puzzle? Given a 3×3 board with 8 tiles (every tile has one number from 1 to 8) and one empty space. The… Read More »