Checking if Two Strings are Isomorphic
Two string literals are considered isomorphic if we can map every character of the first string to every character of the second string in a one-to-one fashion.
Algorithms are the foundational concepts in programming that are used as specifications for performing calculations, data processing, automated decision-making and other tasks.
In laymen’s terms, an algorithm is a set of instructions to be followed to solve a specific problem in order to get the expected results.
Have a look at how to work with the most well-known algorithms using the Java language.
Two string literals are considered isomorphic if we can map every character of the first string to every character of the second string in a one-to-one fashion.
In tail recursion, no other operation is performed after the recursive function call, while in non-tail recursion, an operation is performed on the calculated value.
The jump search or block search searches an element into a sorted array by skipping/jumping ahead by a fixed number of elements in each step.
Learn linear search algorithm and understand it with an example including best-case and worst-case scenarios with time and space complexity.
Recursion is a powerful algorithmic technique (divide-and-conquer strategy) in which a function calls itself (either directly or indirectly) on a smaller problem of the same type in order to simplify the problem to a solvable state. 1. What is Recursion? Recursion is an approach for the problems that can be …
Quicksort follows the divide-and-conquer approach and works by dividing the input array into two sub-arrays, then recursively sorting each sub-array before merging.
Bubble Sort is a simple and slow sorting algorithm that repeatedly steps through the collection, compares each pair of adjacent elements and swaps them if they are in the wrong order.
Selection Sort is a simple and slow sorting algorithm that repeatedly selects the lowest or highest element from the unsorted array and moves it to the end of the sorted array.
Learn insertion sort with in-depth exploration of the algorithm, complexity, implementation in Java, and key advantages and disadvantages.
Merge sort functions by partitioning the input into smaller sub-arrays, sorting each sub-array recursively, and subsequently merging the sorted sub-arrays.
Have you ever wondered how spell checkers, in any word editor, suggest you a list of probable other words whenever you have any spelling mistake?? This is done using phonetic search. Soundex is a phonetic algorithm for indexing names by sound, as pronounced in English. The goal is for homophones …
HowToDoInJava provides tutorials and how-to guides on Java and related technologies.
It also shares the best practices, algorithms & solutions and frequently asked interview questions.