Tagged articles
2 articles
Page 1 of 1
php Courses
php Courses
Sep 4, 2023 · Fundamentals

Binary Search: Explanation and PHP Implementations

Binary search is an efficient O(log n) algorithm for locating a target value in a sorted array, and this article explains its step-by-step process, provides iterative and recursive PHP code examples, and discusses their usage and performance considerations.

Binary SearchIterativeO(log n)
0 likes · 6 min read
Binary Search: Explanation and PHP Implementations
Programmer DD
Programmer DD
Jan 4, 2019 · Fundamentals

How to Build an O(log n) Priority Queue with a Binary Heap in JavaScript

This article explains the concept of a priority queue, presents a interview‑style problem requiring O(log n) enqueue and dequeue operations, and shows how to implement the solution efficiently using a binary heap with detailed step‑by‑step illustrations and a complete JavaScript code example.

Data StructuresO(log n)algorithm
0 likes · 8 min read
How to Build an O(log n) Priority Queue with a Binary Heap in JavaScript