Algorithms
Curated, versioned examples. Opening one gives you your own project — the official sample never changes. Short programs to try instead: public examples ›
- Binary Search 1.5.0 Find a value in a sorted list by halving the search range at every step — O(log n). Python JavaScript Java C C++ PHP TypeScript
- Bubble Sort 1.2.0 Repeatedly swap adjacent out-of-order pairs; stop early when a pass makes no swap — O(n²). Python JavaScript Java C C++ PHP TypeScript
- Heap Sort 1.2.0 Build a max-heap, then repeatedly move the largest element to the end — O(n log n), in place. Python JavaScript Java C C++ PHP TypeScript
- Insertion Sort 1.2.0 Insert each element into the sorted part on its left — O(n²), fast on nearly sorted data. Python JavaScript Java C C++ PHP TypeScript
- Linear Search 1.2.0 Check each element in order until the target is found — O(n), works on unsorted data. Python JavaScript Java C C++ PHP TypeScript
- Merge Sort 1.2.0 Split in half, sort each half, merge the sorted halves — O(n log n), stable. Python JavaScript Java C C++ PHP TypeScript
- Quick Sort 1.2.0 Partition around a pivot (Lomuto scheme, last element) and sort each side — O(n log n) on average. Python JavaScript Java C C++ PHP TypeScript
- Selection Sort 1.2.0 Pick the smallest remaining element and swap it into place — O(n²), at most n−1 swaps. Python JavaScript Java C C++ PHP TypeScript
- SQL Joins and Aggregation 1.0.0 LEFT JOIN, GROUP BY with HAVING, a CTE, running totals and rankings with window functions on a small, made-up shop database. SQL
- SQL Basics 1.0.0 SELECT, WHERE, JOIN, GROUP BY and a window function on a small, made-up school database — in a fresh SQLite database every run. SQL
- SQL Transactions 1.0.0 BEGIN, COMMIT and ROLLBACK, a SAVEPOINT, constraints that refuse bad data, and an upsert — a money transfer on a small, made-up bank. SQL