- Tag · complexity-analysis-

2020

This post provides a foundational overview of sorting algorithms, specifically focusing on Bubble Sort. It covers the problem definition, key properties like stability, and the practical aspects of sorting. For Bubble Sort, the article details its mechanics through an animated illustration, provides a comprehensive complexity analysis (showing its $O(n^2)$ time complexity), and includes a sample Java implementation with explained logic.

This guide covers essential searching algorithms—Linear and Binary Search. It details their logic, pseudocode, Java implementations, and complexities. Binary search's O(log n) efficiency on sorted collections is analyzed using the Master Theorem, and practical tips, including overcoming arithmetic errors and using built-in Java tools, are provided.