## Evaluation of Infix expressions

Infix notation is commonly used in arithmetic formula or statements, the operators are written in-between their operands. Let’s assume the … Read more

Infix notation is commonly used in arithmetic formula or statements, the operators are written in-between their operands. Let’s assume the … Read more

Objective: Given, K sorted linked list, Write an algorithm to merge all the linked list into one linked list which … Read more

Objective: Given a string containing just the characters ( , ) determine if the input string is valid. Example: ()()(()(()))() valid: true … Read more

Objective: Given a graph, check if the graph contains a cycle using disjoint set. Note: Disjoint-set data structure, also called … Read more

Objective: Given a directed graph write an algorithm to find out whether graph contains cycle or not. Example: Approach: Graph … Read more

Objective: Given undirected graph write an algorithm to find out whether graph contains cycle or not. Example: Approach: Earlier we … Read more

Objective: Given an array write an algorithm to print all the possible sub subsequences. Example: int [] a = {1, 2, … Read more

Objective: There are n number of eggs and building which has k floors. Write an algorithm to find the minimum number … Read more

Objective: Given ‘n’ Nuts and ‘n’ Bolts of different sizes. There is one-to-one mapping between nuts and bolts. Write an algorithm … Read more

Objective: Given an array represents cost of a stock on each day. You are allowed to buy and sell the stock … Read more

Objective: Given an array of integers, write a algorithm to find the element which appears maximum number of times in … Read more

Objective: Given an array of integers, find out duplicates in it. Example: int [] a = {4, 6, 2, 1, … Read more

Objective: Given a string, write an algorithm to find the last non repeating character in it. Example: String input = … Read more

Objective: Given a string, write an algorithm to find the last repeating character in it. Example: String input = “horizon … Read more