#Recursion
4 notas · última:
Memoization for a recursive function in F#
The post shows how to memoize a recursive F# solution for an Advent of Code puzzle, compares dictionary and map-based caches, and reports BenchmarkDotNet results.
Merge Sort
The page explains merge sort as a divide-and-conquer method that splits an array into smaller subarrays until size 0 or 1, then rebuilds a sorted array by merging.
Ruby and recursion - find out all possible chess knights movements using minimax algorithm
The post explains knight movement, recursion, and the minimax algorithm, then shows how a 4x4 Ruby program builds a move tree and uses ranks to choose the computer’s next move.
XSLT ForEach
An XSLT 1.0 stylesheet uses a recursive named template to print a numeric range, splitting the interval at the midpoint and recursing on each half until start and end match.
