Tagged articles
Sorting Algorithm
15 articles · Page 1 of 1
Counting sort is a non‑comparison integer sorting algorithm with O(n + k) time complexity, and this article explains its principles, step‑by‑step process, PHP implementation code, advantages, drawbacks, and suitable use cases for efficient data handling in backend development.
PHPSorting Algorithmalgorithm implementation
0 likes · 5 min read

This article explains the QuickSort algorithm’s divide-and-conquer principle, walks through its step-by-step process, provides a complete Go implementation with code, discusses practical applications, performance considerations, and future optimization directions, offering readers a solid grasp of sorting fundamentals.
Divide and ConquerGo ProgrammingSorting Algorithm
0 likes · 5 min read


ITPUBNov 12, 2022 · Databases
This article explains how MySQL executes ORDER BY queries, compares the default sorting algorithm with the rowid method, and provides practical optimization steps such as indexing, adjusting sort_buffer settings, and choosing the appropriate algorithm based on data size and memory.
IndexMySQLORDER BY
0 likes · 7 min read

This article explains the insertion sort algorithm, describes how it repeatedly inserts each element into its correct position in a growing sorted portion of the array, and provides a complete PHP function that sorts a numeric array while preserving stability.
PHPSorting Algorithmfundamentals
0 likes · 2 min read

This article explains the Bubble Sort algorithm, its O(n²) time and O(1) space complexities, describes the step‑by‑step sorting process, provides a complete PHP implementation, and shows sample input and output to illustrate how the algorithm orders data.
Code ExamplePHPSorting Algorithm
0 likes · 3 min read

The article demystifies Java’s Arrays.sort by tracing its call to TimSort.sort, explaining how the hybrid Timsort algorithm blends merge and insertion sorts, determines minimum run lengths, partitions and merges runs, addresses implementation bugs such as stack allocation and comparator misuse, and celebrates its elegant, efficient design.
Arrays.sortJDKJava
0 likes · 15 min read

This article explains the merge sort algorithm in detail, covering its divide‑and‑conquer principle, step‑by‑step process with illustrative examples, a complete C implementation, and an analysis of its time and space complexities and suitable use cases.
Divide and ConquerSorting Algorithmalgorithm analysis
0 likes · 7 min read

This article explains heap sort by introducing its theory, visual step‑by‑step construction of a max‑heap, a complete Python implementation, and an analysis of its time and space complexities, including detailed code walkthrough and complexity derivations.
AlgorithmComplexity AnalysisSorting Algorithm
0 likes · 7 min read

This article explains the heap sort algorithm, describing the heap data structure, the process of building a max‑heap, the sorting loop with element swaps, and provides detailed Java code examples along with key points and an illustrative example array.
Sorting Algorithmalgorithm tutorialdata structures
0 likes · 5 min read

The article presents a practical case of sorting a 4.6 GB file with 500 million random integers, evaluates in‑memory quicksort and merge‑sort implementations, discusses bitmap sorting, and finally details a multi‑phase external‑sort algorithm with measured runtimes and resource considerations.
Sorting Algorithmbitmap sortexternal sort
0 likes · 11 min read

This article explains the quick sort algorithm, covering its basic divide‑and‑conquer principle, a naïve C implementation, improvements such as two‑way partitioning, random and median‑of‑three pivot selection, and a non‑recursive version using an explicit stack, with full source code examples.
C languageDivide and ConquerNon-Recursive
0 likes · 9 min read

This article explains the quicksort algorithm—its history, divide‑and‑conquer principle, detailed Python implementations, performance analysis, and practical optimizations for small data sets—providing clear examples and interview‑ready code for developers.
Code ExampleDivide and ConquerSorting Algorithm
0 likes · 9 min read

Discover how a playful setTimeout‑based sorting trick leverages JavaScript’s event loop to produce correct ordering, while explaining the core concepts of synchronous vs asynchronous tasks, the execution stack, task queue, and why this method isn’t practical for large datasets.
JavaScriptSorting Algorithmasynchronous
0 likes · 6 min read

This comprehensive guide explains QuickSort’s divide‑and‑conquer principle, presents two PHP‑style implementations, analyzes its O(N log N) average and O(N²) worst‑case performance, and details practical optimizations such as random pivot selection, switching to insertion sort for small sub‑arrays, three‑way and dual‑pivot variants.
JavaPHPPerformance Analysis
0 likes · 10 min read

MySQL's ORDER BY can either use an ordered index to return rows directly or apply one of two sorting algorithms—original and the MySQL 4.1 enhanced version—to sort data in memory, with the newer method reducing I/O by avoiding a second table read at the cost of higher memory usage.
IndexMySQLORDER BY
0 likes · 3 min read
