set interface

The Java Set Interface, Implementations and Examples

The Set interface is a collection that cannot contain duplicate elements. It models the mathematical set abstraction and is used to represent sets like below Cards comprising a poker hand Courses making up the schedule of a student The processes running… 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!