This page list down all java algorithms and implementations discussed in this blog, for quick links. Feel free to suggest more algorithms you may want to learn.
Java Sorting Algorithms
Quick Sort
Quicksort is a divide and conquer algorithm, which means original array is divided into two arrays, each of them is sorted individually and then sorted output is merged to produce the sorted array.
Merge Sort
Merge sort is used when the data structure doesn’t support random access, since it works with pure sequential access (forward iterators, rather than random access iterators). It’s also widely used for external sorting, where random access can be very, very expensive compared to sequential access.
Bubble Sort
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
Selection Sort is a simple and slow sorting algorithm that repeatedly selects the lowest or highest element from the un-sorted section and moves it to the end of the sorted section.
Insertion Sort
Insertion Sort is a simple and slow sorting algorithm that repeatedly takes the next element from the un-sorted section and inserts it into the sorted section at the correct position.
More Java Algorithms
Below are more Java Algorithms present in the blog.
Phonetic search using 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.
Compare and Swap [CAS] Algorithm
This algorithm compares the contents of a memory location to a given value and, only if they are the same, modifies the contents of that memory location to a given new value. This is done as a single atomic operation.
Password encryption using MD5, SHA, PBKDF2, BCrypt etc.
A password hash is an encrypted sequence of characters obtained after applying certain algorithms and manipulations on user provided password, which are generally very weak and easy to guess. Let’s explore few algorithms to generate these hashes.
How to detect infinite loop in linkedlist
You are asked that if you have a linked list in which you can traverse only in one direction, and if that linked list has a loop in it, how you will detect it?? Let’s solve the problem.
AES (Advanced Encryption Standard) Algorithm Example
Advanced Encryption Standard which is a symmetric encryption algorithm. AES encryption is used by U.S. for securing sensitive but unclassified material, so we can say it is enough secure.
Happy Learning !!
which algorithm is used for java qr code implementation program