Java Algorithms

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.

Introduction to Recursion

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 …

Java EdDSA (Ed25519 / Ed448) Example

EdDSA (Edwards-Curve Digital Signature Algorithm) [RFC 8032] is another additional digital signature scheme added in Java 15 thorough JEP 339. It does not replace the existing Elliptic Curve Digital Signature Algorithm (ECDSA) in JDK. EdDSA provides following parameter choices : Algorithm Name Description EdDSA Edwards-Curve signature algorithm as defined in …

Implement Phonetic Search with Soundex Algorithm

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 …

Java Compare and Swap Example – CAS Algorithm

One of the best additions in java 5 was Atomic operations supported in classes such as AtomicInteger, AtomicLong etc. These classes help you in minimizing the need of complex (un-necessary) multi-threading code for some basic operations such as increment or decrement a value which is shared among multiple threads. These …

About Us

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.