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

Merge K sorted Linked List – Using Priority Queue

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

Valid Brackets – Part 2 | Stack Method

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

Find duplicates in an given array in O(n) time and O(1) extra space.

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

Find the last repeating character in a given string.

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