Topic

Algorithms

Algorithm and data structure discussions covering complexity analysis, competitive programming, and practical implementation insights from developer communities.

What this topic tracks

  • Engineering practices and ecosystem debates
  • Tools, architecture, and implementation lessons
  • Relevant discussions from developer communities

Algorithms · 306 stories

Recent stories

Each story's summary, with the places it was discussed.

Summaries are written by AI from the linked sources. Open the source for full context.

20 stories

A Perceptron in Age of Empires II

adewynter.github.io · 18 Jun

Artificial Intelligence · Algorithms · Machine Learning

A developer created functional logic gates, a perceptron, and an ansatz-based training circuit within Age of Empires II using the scenario editor.

By utilizing game entities like goats as signal carriers and environmental features as logic gates, the project demonstrates complex computational concepts and machine learning fundamentals inside a real-time strategy game environment.

Integer multiplication below n log n

github.com · 6 Oct

Algorithms · Mathematics · Computer Science

OpenAI released a preprint titled “Integer multiplication below n log n” on September 23, 2026.

The repository contains the paper as a PDF, a README with citation information, and a build directory. The listed author is OpenAI, and the work is identified as an OpenAI Math Release preprint; the provided material does not include the paper’s methods or results.

Reverse-engineering the Intel 8087's tangent algorithm: more than CORDIC

righto.com · 26 Sept

Algorithms · Hardware · Low-Level Programming

Reverse-engineering Intel’s 8087 reveals that FPTAN combines 16-bit CORDIC pseudo-division and pseudo-multiplication with a Padé rational approximation, 3x/(3−x²), to achieve 64-bit tangent accuracy without directly performing division.

Die microscopy and microcode analysis explain its fixed-point scaling, datapath usage, exceptional cases, and performance—about 90 microseconds, roughly 100× faster than 8086 emulation.

Anatomy of a Texture

agentlien.github.io · 16 Sept

Algorithms · Low-Level Programming · Performance

Porting textures between PC and consoles requires calculating platform-specific memory addresses across BC7 block compression, texel swizzles, mip levels, tiled layouts, and non-contiguous streaming heaps.

These optimizations improve cache locality, bandwidth, and rendering cost, but complicate conversion and debugging. Correct handling requires mapping every block, tile, and mip while accounting for differing layouts and platform conventions.

When the fractional part of a float fixes your shader

crocidb.com · 13 Sept

Algorithms · Performance · Testing

A Voronoi shader developed for a music video stuttered only on a Windows PC with an RTX 4070.

Investigation traced the issue to DirectX 11 rendering through ANGLE: FXC’s O3 optimization incorrectly simplified GLSL/HLSL fractional calculations, truncating coordinates and snapping Voronoi centers. Replacing `fract` with equivalent arithmetic or introducing decimal multipliers avoided the miscompilation.

Factoring RSA 260

cognition.com · 9 Sept

Algorithms · Cybersecurity · Encryption

Cognition’s research team used autonomous Devin agents to GPU-optimize CADO-NFS and factor RSA-260, setting a new public record at an estimated $400,000.

The work demonstrates major cost reductions for RSA-1024 attacks—potentially around $30 million—while RSA-2048 remains impractical. It also highlights autonomous software engineering’s growing impact on computational mathematics and cryptanalysis.

Bipartite Matching Is in NC

scottaaronson.blog · 22 Jun

Algorithms · News · Computer Science

A new paper by Chatterjee et al. claims that Bipartite Matching is in the complexity class NC, marking a major breakthrough in parallel algorithms.

This result resolves a long-standing challenge by successfully derandomizing the Mulmuley-Vazirani-Vazirani algorithm, proving that Bipartite Matching is solvable in deterministic polylogarithmic time.

Rabbit Ear "Origami": programmable origami in the browser

rabbitear.org · 4 Feb

Algorithms · Programming Languages · Computer Science

The provided text outlines the capabilities of Rabbit Ear, an origami-based computational library that utilizes FOLD objects and graph theory to model flat-foldable origami.

Centered around the mathematical principles of folding, it explores specific theorems such as Kawasaki's theorem—which dictates that the alternating sum of sector angles around a single vertex must be 180° for flat-foldability—and Maekawa’s theorem, which requires the difference between mountain and valley creases to be exactly two. The library provides tools for 2D and 3D visualization, including a global layer-order solver designed to handle complex face-overlapping scenarios, ensuring correct SVG rendering of folded models. Additionally, the system implements the seven origami axioms to allow users to programmatically generate creases through geometric constructions rather than relying solely on coordinate-based inputs, making it a robust platform for both design and technical simulation.

All 23-Bit Still Lifes Are Glider Constructible

mvr.github.io · 27 Dec

Algorithms · C++ · Computer Science

A multi-year collaborative project has successfully confirmed that all 1,646,147 strict 23-bit still lifes in Conway's Game of Life are glider constructible.

This achievement pushes the lower bound for unsynthesizable patterns up from 22 bits, moving closer to the current record of a 154-population unsynthesizable patch found in 2022. The project utilized advanced computational tools, including Stomp, a C++ multithreaded tree-search script designed to transfer synthesis steps between patterns, and Mr. Component, which identifies and synchronizes interacting subcomponents. These tools handled 99.97% of the targets by automating massive searches of glider collisions and catalytic reactions. While the number of still lifes grows exponentially with each bit—the 23-bit project being 2.4 times larger than the previous 22-bit endeavor—these algorithmic improvements allowed the community to solve complex patterns that would otherwise require manual synthesis talent. The longest recipe discovered for a 23-bit still life currently stands at 47 steps using 178 gliders.

Vector graphics on GPU

gasiulis.name · 8 Aug

Algorithms · Performance

This article discusses the transition of vector graphics rendering from CPU to GPU, highlighting the inefficiency of traditional CPU-based rasterization.

It explores a general principle of rasterization using winding numbers and details a GPU-friendly approach that processes pixels in parallel. The author explains the implementation of analytic anti-aliasing to achieve smooth edges, demonstrating how mathematical 'area' and 'cover' values can determine pixel opacity more efficiently than supersampling. To handle complex shapes, the proposed system divides the screen into 32x32 blocks and uses cover tables to carry information between them. By offloading blending and color calculations to the GPU while keeping block preparation on the CPU, the author achieved a 10-15x performance increase, specifically benefiting high-load tasks like radial gradients and image fills.

Learn Trapping Rain Water, Top K Frequent and Selection Sort with Step-by-Step Visualization in DSA View View 👀👀

dev.to · 9 Sept

Algorithms · TypeScript · Computer Science

The article demonstrates DSA View View, a tool for visualizing TypeScript execution, through Trapping Rain Water (two pointers, O(n)), Top K Frequent Elements (frequency buckets, O(n)), and Selection Sort (repeated selection, O(n²)).

Step-by-step runtime views clarify changing pointers, maps, buckets, indexes, and sorted regions.

Deconstructing Datalog

rntz.net · 14 Jun

Algorithms · Programming Languages · Computer Science

The dissertation 'Deconstructing Datalog' explores integrating Datalog’s recursive query features into typed functional programming.

By redefining recursion as a least prefix point operator and using type systems to track monotonicity, the author introduces Datafun. The work also details optimizing these queries using seminaïve evaluation, providing a theoretical foundation for combining logic and functional programming paradigms.

Teaching robots to carve marble sculptures

eleanorwiesler.com · 18 Nov

Algorithms · Robotics

Monumental Labs built and announced an end-to-end autonomous CNC stone-carving system that turns a 3D model and marble block into a sculpture using KUKA KR240 robots without humans in the manufacturing loop.

Sparse voxels and signed distance fields support roughing; finishing uses layered surfaces, point-cloud segmentation, geodesic toolpaths, machine-learning-assisted connections, tool orientations, and collision-free kinematics. Simulation validates the process before cutting, and the system carved a marble Stanford Bunny; hand finishing remains planned for final surface refinement.

The Fastest Way to Board an Airplane

navendu.me · 21 Feb

Algorithms · Mathematics · Computer Science

The article explores airplane boarding efficiency through simulations, comparing methods like back-to-front, random, WilMA (Window-Middle-Aisle), and the Steffen Method.

It highlights that parallel bag stowage and minimizing aisle interference are key, though real-world factors like priority classes and human behavior often outweigh theoretical efficiency.

Exponential Behavior in Magic: The Gathering

levineuwirth.org · 18 Nov

Algorithms · Performance

Arcana’s implementation of Magic: The Gathering exposed how exponential token growth can overwhelm a rules engine.

Liliana, the Last Hope’s emblem doubles Zombies plus two each end step, reaching 7,256 Zombies by turn 58; resolving one emblem took 35 seconds because every arrival triggered repeated battlefield scans. Exponential combat-declaration combinations also prevented the random player from choosing a lethal attack. After nine fuzzing jobs timed out, the harness added a 500-permanent battlefield cap, while caching checks and reserving attack options were identified as potential fixes.

Subquadratic 3SUM and Subcubic APSP

arxiv.org · 6 Oct

Algorithms · Computer Science

Josh Alman and Virginia Vassilevska Williams give the first polynomial improvements over textbook algorithms for 3SUM and APSP: deterministic runtimes are O(n^1.9992) for 3SUM and O(n^2.9995) for APSP on polynomially bounded integers.

Their central thin matrix-product algorithm computes selected entries in O(N^2/D^0.063) operations when D≤N^1/18 and at most N^2/√D entries are requested. It yields a subquadratic All-Edges Sparse Triangle algorithm and, through reductions, refutes several standard fine-grained complexity hypotheses.

Learn Valid Parentheses, Reverse Linked List, and Tree Max Depth with Step-by-Step Visualization in DSA View View 👀👀

dev.to · 26 Aug

Algorithms · TypeScript · Computer Science

DSA View View makes TypeScript algorithms easier to understand by visualizing runtime state step by step.

The article demonstrates Valid Parentheses with a Stack, Reverse Linked List with Pointer manipulation, and Maximum Depth of Binary Tree with Recursion, explaining their mechanics, complexity, and mental models. The tool supports interactive inputs and visual views for arrays, trees, lists, and stacks.

From Rank 6,000,000 to 26,000: 1.5 Years, 1040 LeetCode Problems, and a Surprise Package That Changed Everything

dev.to · 13 May

Algorithms · Career · Productivity

The author reflects on an 18-month journey of solving 1,040 LeetCode problems, emphasizing that consistent, small efforts eventually build intuitive pattern recognition.

Beyond improving rankings, the real achievement was developing resilience and a deeper understanding, proving that progress is a quiet, continuous process rather than a sudden transformation.

Lessons from Hash Table Merging

gist.github.com · 1 Jan

Algorithms · C++ · Performance

This technical analysis investigates a significant performance degradation observed when merging millions of keys between hash maps.

While hash map merging is theoretically an O(N) operation, the author demonstrates that popular libraries like Abseil, Boost, and Rust's standard library can suffer from a 20x slowdown due to primary clustering. This occurs when two maps share the same hash function, causing keys to be inserted in an order that saturates the beginning of buckets. The post explores three primary solutions: using a salted hasher to randomize key placement, preallocating memory to reduce bucket saturation, and implementing stride iteration to visit buckets in a non-sequential order. The analysis concludes that while preallocation is often the fastest, salted hashers provide robust protection against clustering and hash flooding.

Growing Trees

brashandplucky.com · 23 Oct

Algorithms

Procedural linden trees are grown season by season using a Self-organizing tree model: buds measure light in a voxel shadow grid, aggregate it to the root, redistribute growth resource, and produce shoots when funded.

Feedback shapes the crown, while λ biases growth toward the main axis or laterals. Tropism, noise, and phyllotaxis control directions; poorly lit branches self-prune. Pipe modeling adds girth; tube bark and twig-spray cards create foliage, with LOD and baked forest views.

Where it came fromHacker NewsDev.toLobstersCreate a Snapbyte.dev digest and choose Algorithms as one of your topics.Build your digest