## Lexicographically next permutation With One swap

Objective: Given an array of integers (in particular order or permutation of a set of numbers), write an algorithm to … Read more

Objective: Given an array of integers (in particular order or permutation of a set of numbers), write an algorithm to … Read more

Stable Marriage Given N men and N women and the marriage preference order for each man and woman. Their marriage … Read more

Objective: Given a graph, write an algorithm to find all the articulation points or cut vertices. Articulation Points: In a … Read more

Objective: Given a 2d grid map of ‘1’s (land) and ‘0’s (water), count the number of distinct or unique islands. … Read more

Objective: Given a graph and a source vertex write an algorithm to find the shortest path from the source vertex to … Read more

Objective: Given a graph represented by the adjacency List, write a Depth-First Search(DFS) algorithm to check whether the graph is … Read more

Earlier we had discussed how to evaluate prefix expression where operands are of single-digit. In this article, we will discuss … Read more

Prefix notation is a notation for writing arithmetic expressions in which the operands appear after their operators. There are no … Read more

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

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

Problem Statement: There is an application that has several processes running in parallel and each process prints the logs in … 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 an Infix expression, write an algorithm to convert it into Postfix expression. Example: Input: Infix expression – A … 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