## 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

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

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

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

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

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

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

Objective: Given an array of integers, write a program to check if array contains all unique numbers. Example: Integer [] … Read more

Objective: Given a number, write a java program to reverse a number Example: Given Number: 1234 Output: 4321 Given Number: … Read more

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

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

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

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

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

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

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