The Baeldung logo
  • The Baeldung Logo
  • Start Here
  • Courses ▼▲
    • REST with Spring

      The canonical reference for building a production grade API with Spring

    • Learn Spring Security ▼▲

      THE unique Spring Security education if you’re working with Java today

      • Learn Spring Security Core

        Focus on the Core of Spring Security 5

      • Learn Spring Security OAuth

        Focus on the new OAuth2 stack in Spring Security 5

    • Learn Spring

      From no experience to actually building stuff​

    • Learn Spring Data JPA

      The full guide to persistence with Spring Data JPA

  • Guides ▼▲
    • Persistence

      The Persistence with Spring guides

    • REST

      The guides on building REST APIs with Spring

    • Security

      The Spring Security guides

  • About ▼▲
    • Full Archive

      The high level overview of all the articles on the site.

    • Baeldung Ebooks

      Discover all of our eBooks

    • About Baeldung

      About Baeldung.

Algorithms

Algorithms are one of the foundational concepts in programming. Have a look at how to work with the most well-known algorithms using the Java language.

  • Math (11)
  • Java String (7)
  • Java Search (7)
  • Java Array (6)
  • Java Map (3)
  • Sorting (3)

>> Find the N Most Frequent Elements in a Java Array

>> Java Program to Print Pascal’s Triangle

>> Find the First Non Repeating Character in a String in Java

>> Java Program to Calculate the Standard Deviation

>> Gravity/Bead Sort in Java

>> Algorithm to Identify and Validate a Credit Card Number

>> Permutations of a String in Java

>> Create a Simple “Rock-Paper-Scissors” Game in Java

>> Producer-Consumer Problem With Example in Java

>> How to Implement LRU Cache in Java

>> Determine if an Integer’s Square Root Is an Integer in Java

>> Data Modeling with Apache Kafka

>> Reversing a Linked List in Java

>> Largest Power of 2 That Is Less Than the Given Number with Java

>> Find the Kth Smallest Element in Two Sorted Arrays in Java

>> How to Implement a CNN with Deeplearning4j

>> Finding Top K Elements in a Java Array

>> Implementing a Ring Buffer in Java

>> Implementing a 2048 Solver in Java

>> Introduction to Lock-Free Data Structures with Java Examples

>> Boruvka’s Algorithm for Minimum Spanning Trees in Java

>> Gradient Descent in Java

>> How to Use Regular Expressions to Replace Tokens in Strings in Java

>> Fast Pattern Matching of Strings Using Suffix Tree in Java

>> Guide to AVL Trees in Java

>> Balanced Brackets Algorithm in Java

>> Partitioning and Sorting Arrays with Many Repeated Entries with Java Examples

>> Efficiently Merge Sorted Java Sequences

>> Obtaining a Power Set of a Set in Java

>> Introduction to Greedy Algorithms with Java

>> Branch Prediction in Java

>> Kruskal’s Algorithm for Spanning Trees with a Java Implementation

>> Range Search Algorithm in Java

>> Median of Stream of Integers using Heap in Java

>> How to Merge Two Sorted Arrays in Java

>> Maximum Subarray Problem in Java

>> Overview of Combinatorial Problems in Java

>> Prim’s Algorithm with a Java Implementation

>> Fibonacci Series in Java

>> Basic Calculator in Java

>> The Caesar Cipher in Java

>> Implementing A* Pathfinding in Java

>> How to Determine if a Binary Tree is Balanced in Java

>> Knapsack Problem Implementation in Java

>> Breadth-First Search Algorithm in Java

>> Bucket Sort in Java

>> Logistic Regression in Java

>> Radix Sort in Java

>> Counting Sort in Java

>> Machine Learning with Spark MLlib

>> Counting Words in a String with Java

>> Finding the Least Common Multiple in Java

>> Creating a Triangle with for Loops in Java

>> Interpolation Search in Java

>> Guide to In-Place Sorting Algorithm Works with a Java Implementation

>> The K-Means Clustering Algorithm in Java

>> Calculating Logarithms in Java

>> Selection Sort in Java

>> Finding Greatest Common Divisor in Java

>> Better Retries with Exponential Backoff and Jitter

>> Shell Sort in Java

>> Looping Diagonally Through a 2d Java Array

>> Matrix Multiplication in Java

>> Checking If a List Is Sorted in Java

>> A Guide to the Folding Technique in Java

>> Set Operations in Java

>> Find If Two Numbers Are Relatively Prime in Java

>> Generate Combinations in Java

>> Check If a String Contains Multiple Keywords in Java

>> Finding Leap Years in Java

>> Implementing Simple State Machines with Java Enums

>> Check if a String is a Pangram in Java

>> Calculate Factorial in Java

>> Find Substrings That Are Palindromes in Java

>> Calculate the Area of a Circle in Java

>> Convert Latitude and Longitude to a 2D Point in Java

>> Heap Sort in Java

>> Using Math.sin with Degrees

>> Quicksort Algorithm Implementation in Java

>> Merge Sort in Java

>> Hashing a Password in Java

>> Round Up to the Nearest Hundred in Java

>> A Guide to OptaPlanner

>> Check If Two Rectangles Overlap In Java

>> Calculate the Distance Between Two Points in Java

>> Time Complexity of Java Collections

>> Check If a String Contains All The Letters of The Alphabet with Java

>> Find the Intersection of Two Lines in Java

>> Calculate Age in Java

>> Interpreter Design Pattern in Java

>> Converting Between Roman and Arabic Numerals in Java

>> Practical Java Examples of the Big O Notation

>> Find the Middle Element of a Linked List in Java

>> Histograms with Apache Commons Frequency

>> Service Locator Pattern and Java Implementation

>> Intro to Apache OpenNLP

>> Find All Pairs of Numbers in an Array That Add Up to a Given Sum in Java

>> Multi-Swarm Optimization Algorithm in Java

>> Create a Sudoku Solver in Java

>> A Maze Solver in Java

>> Check if a String is a Palindrome in Java

>> How to Find the Kth Largest Element in Java

>> Implementing a Binary Tree in Java

>> How to Calculate Levenshtein Distance in Java?

>> Bubble Sort in Java

>> A Guide to Deeplearning4j

>> Introduction to JGraphT

>> Binary Search Algorithm in Java

>> String Search Algorithms for Large Texts with Java

>> Guide to the HyperLogLog Algorithm in Java

>> Introduction to Minimax Algorithm with a Java Implementation

>> Monte Carlo Tree Search for Tic-Tac-Toe Game in Java

>> Locality-Sensitive Hashing in Java Using Java-LSH

>> Example of Hill Climbing Algorithm in Java

>> The Dining Philosophers Problem in Java

>> Introduction to Jenetics Library

>> Validating Input with Finite Automata in Java

>> Ant Colony Optimization with a Java Example

>> Design a Genetic Algorithm in Java

>> Overview of AI Libraries in Java

>> Dijkstra Shortest Path Algorithm in Java

>> A Collaborative Filtering Recommendation System in Java

>> The Traveling Salesman Problem in Java

  • ↑ Back to Top
res – REST with Spring (eBook) (everywhere)
opt-in
Building a REST API with Spring 5?
Download the E-book
The Baeldung logo

Courses

  • All Courses
  • All Bulk Courses
  • All Bulk Team Courses
  • The Courses Platform

Series

  • Java “Back to Basics” Tutorial
  • Jackson JSON Tutorial
  • Apache HttpClient Tutorial
  • REST with Spring Tutorial
  • Spring Persistence Tutorial
  • Security with Spring
  • Spring Reactive Tutorials

About

  • About Baeldung
  • The Full Archive
  • Editors
  • Jobs
  • Our Partners
  • Partner with Baeldung
  • Terms of Service
  • Privacy Policy
  • Company Info
  • Contact
The Baeldung Logo