Queue Implementation Using Array

A queue is a linear data structure that follows an order i.e FIFO(First In First Out), where the element which is inserted at the first will come out first. Unlike Stack, while implementing a queue, an element is inserted from one end and removed from another end. Basically, there are 4 basic operations that are …

Read more

Stack Implementation Using Array

Stack is a linear data structure that follows an order i.e LIFO(Last In First Out), where the element which is inserted at the last will come out first. Basically, there are 4 basic operations that are performed in the stack: Push: Adds an item in the stack. Pop: Removes an item from the stack. The …

Read more

How to Check If String is Palindrome

In this example, we’ll check if String is Palindrome or not. Palindrome: A sequence of characters that reads the same backward as forward. 1. Java #Approach 1 Output: #Approach 2 Complete Java Solutions can be found here: Github Link

How to Check If Two Strings Are Anagrams

In this example, we’ll check if two strings are anagrams of each other. A string is said to be an anagram if it contains the same characters and same length but in a different order. 1. Java Output: Check Anagrams Using Sorting: Output: Complete Java Solutions can be found here: Github Link