Algorithms & Data Structures
Master sorting, searching, linked lists, and complexity analysis — with clean Java implementations for interviews and production.
Advertisement
Algorithm Tutorials 5 posts
From basics to interview-level problem solving
Linear Search in Java with Example
It is an algorithm that searches for an element one by one in an array, until the target element is found. Consider if X is an element to be…
AlgorithmBinary Search in Java with Example
It is an algorithm that searches for an element in a sorted array, and it follows a Divide and Conquer algorithmic model. Dictionary is the …
AlgorithmMaps Space-time complexity
Learn more about Code Complexity
AlgorithmCustom LinkedList Implementation in Java
What is Linked List ? A linked list is a linear data structure containing interconnected nodes through pointers. Since there is no concept o…
AlgorithmAlgorithm Code Complexity
Code Complexity compute it by using the control flow graph of the program. Cyclomatic complexity measures the number of nested conditions wi…
All Algorithm Posts
- Linear Search in Java with Example 2023-01-01
- Binary Search in Java with Example 2023-01-01
- Maps Space-time complexity 2022-08-16
- Custom LinkedList Implementation in Java 2022-08-16
- Algorithm Code Complexity 2022-08-14
Dynamic Programming
Interview-ready DP problems with Java solutions
Dynamic Programming Interview Questions Java with Solutions
Table of Contents Prerequisites for Dynamic Programming in Java Deep Dive into Dynamic Programming Concepts Step-by-Step Approach to Solving…
JavaDynamic Programming in Java: A Complete Guide with Examples 2026
Prerequisites for Dynamic Programming To start with dynamic programming in Java, you should have a solid grasp of the **Java programming lan…
JavaDynamic Programming Problems in Java for Beginners
Introduction to Dynamic Programming Dynamic programming is a method for solving complex problems by breaking them down into simpler subprobl…
JavaDynamic Programming Interview Questions Java with Solutions and Examples
Table of Contents Introduction to Dynamic Programming Why Dynamic Programming is Important Dynamic Programming Interview Questions Real-Worl…
Complexity Cheat Sheet
Quick reference for common algorithm time & space complexities
| Algorithm | Best | Average | Worst | Space |
|---|---|---|---|---|
| Binary Search | O(1) | O(log n) | O(log n) | O(1) |
| Linear Search | O(1) | O(n) | O(n) | O(1) |
| Merge Sort | O(n log n) | O(n log n) | O(n log n) | O(n) |
| Quick Sort | O(n log n) | O(n log n) | O(n²) | O(log n) |
| Bubble Sort | O(n) | O(n²) | O(n²) | O(1) |
| Insertion Sort | O(n) | O(n²) | O(n²) | O(1) |
| HashMap Lookup | O(1) | O(1) | O(n) | O(n) |
| TreeMap Lookup | O(log n) | O(log n) | O(log n) | O(n) |
📚 Algorithm Learning Path
Read Next
Ready to Crack Algorithm Interviews?
All posts are free. No login required.
Browse Algorithm Posts →