## Longest substring with at most two unique characters

Objective: Given a string, write an algorithm to find the longest substring with at most two characters. Example: Input: aabbccddc … Read more

## Convert Prefix to Infix Expression

Objective: Given a Prefix expression, write an algorithm to convert it into Infix expression. Example: Input: Prefix expression: + A … Read more

## Find duplicates Characters in the given String

Objective: Given a string, write an algorithm to find all the duplicate characters in the string and print its count. … Read more

## Max Flow Problem – Ford-Fulkerson Algorithm

Objective: Given a directed graph that represents a flow network involving source(S) vertex and Sink (T) vertex.  Each edge in … Read more

## Convert Infix to Postfix Expression

Objective: Given an Infix expression, write an algorithm to convert it into Postfix expression. Example: Input: Infix expression – A … Read more

## Find three smallest elements in a given array

Objective: Given an array of integers, write an algorithm to find the three smallest elements in the array. Example: Int … Read more

## Check if given number is perfect square – O(√N) Solution

Objective: Given a number, write a program to check if given number is perfect sqaure. Example: N = 16 Output: … Read more

## Find first three largest elements in a given array

Objective: Given an array of integers, write an algorithm to find the first three largest elements in the array. Example: … Read more

## Find the nearest building which has bike | Find nearest specific vertex from source in a graph.

Objective: Given a matrix (NxN) which represents the buildings in community. You are in a building and you need a … Read more

## Find two smallest elements in a given array

Objective: Given an array of integers, write an algorithm to find the two smallest elements in the array. Example: Int … Read more

## Print all Unique elements in a given array

Objective: Given an array of integers which contains duplicates as well. Write a program to print all unique elements in … Read more

## Find first two largest elements in a given array

Objective: Given an array of integers, write an algorithm to find the first two largest elements in the array. Example: … Read more

## Calculate Logn base r – Java Implementation

Objective: Given a number n and r, write a program to calculate Logrn Example: N = 32, r =2 Log232= … Read more