Isomorphic Strings in Java: Algorithm, Code and Examples
Two strings are isomorphic when a one-to-one character mapping turns one into the other. Learn the algorithm and check it in Java with arrays or two HashMaps.
Two strings are isomorphic when a one-to-one character mapping turns one into the other. Learn the algorithm and check it in Java with arrays or two HashMaps.
Big O notation categorizes the efficiency of a given algorithm and describes the upper bound of the growth rate of a function as the input grows.
Learn recursion in Java with call stack diagrams, base cases, factorial and Fibonacci examples, memoization and how to avoid StackOverflowError.
Java EdDSA example with Ed25519 and Ed448. Generate keys, sign and verify messages, save and load keys, and compare EdDSA with ECDSA, RSA and ML-DSA.
Learn quicksort in Java with a partition diagram, Lomuto and Hoare code, pivot choice, worst-case fixes and a comparison with Arrays.sort() on Java 25.
Learn bubble sort in Java with a pass-by-pass diagram, the basic and optimized code, sorting objects, and timings against selection and insertion sort.
Learn selection sort in Java with a step diagram, code for arrays and objects, why it is not stable, and how it compares with other simple sorts.
Learn insertion sort in Java with a step diagram, shifting and binary insertion code, and why it beats Arrays.sort() on small or nearly sorted arrays.
Learn merge sort in Java with a split and merge diagram, top-down and bottom-up code, stability, memory use and a comparison with TimSort on Java 25.
Implement the Soundex algorithm in Java, use Apache Commons Codec, handle the H and W rule, and compare Soundex with Metaphone and edit distance.
Compare and swap (CAS) writes a new value only if a variable still holds the value we read. Learn compareAndSet(), CAS loops, VarHandle and the ABA problem in Java 25.
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.