least common element

How to Find Least Common Element in Unsorted Array

Given an unsorted array as an input, the goal is to find least common element or lest frequent element or least repeating element in the array. Let’s solve this problem using the following methods i.e., Method 1: Sorting and Linear Traversal and Method… Read More!

find most common element

Programs to Find Most Common Element in an Unsorted Array

Given an unsorted array as an input, the goal is to find most common element or most frequent element or most repeating element in the array. Let’s solve this problem using the following methods i.e., Method 1: Sorting and Linear Traversal and Method… Read More!

find common elements

Programs to Find Common Elements between Two Unsorted Arrays

Given set of two unsorted arrays as input, the goal is to find common elements between them in an efficient way. Let’s solve this problem using the following methods i.e., Method 1: Iterative approach, Method 2: Using HashSet and Method 3:… Read More!

remove duplicate characters

2 Ways to Remove Duplicate Characters from a String in O(n) Time

Given an input string, the goal is to remove duplicate characters from a string and the output string should have the resultant string without modifying the order of characters in the original string. Let’s solve the above problem in O(n)… Read More!