Equal-sum partition: Examples & Code
Equal-sum partition: Find a subset whose sum is half the total; every item is used at most once. Explore a worked example, complexity and tested code.
Explore algorithm visualizations code snippets and tutorials
Equal-sum partition: Find a subset whose sum is half the total; every item is used at most once. Explore a worked example, complexity and tested code.
Unbounded knapsack: Move capacities forward so each item can be used any number of times. Explore a worked example, complexity and tested code.
Quickselect: Partition around a pivot, then retain only the partition containing the requested zero-based rank. Explore a worked example, complexity and…
Fibonacci search: Probe a sorted array using Fibonacci-sized intervals. Input is sorted first. Explore a worked example, complexity and tested code.
Upper bound: Find the first position whose value is greater than the target. Input is sorted first. Explore a worked example, complexity and tested code.