Skip to content
CAI
Software that uses CAICheck a score

kodecocodes/swift-algorithm-club

54.6

Adequate · 27 September 2026

10.1k

lines of production code

Swift

primary language

3

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This release significantly expands the algorithmic library with a wide array of new data structures and algorithms, including comprehensive implementations for graph algorithms (Dijkstra, A\*, Topological Sort), advanced sorting methods (Introsort, Radix Sort), and specialized structures like Octrees, Quadtrees, and Hashed Heaps. The update also introduces several new algorithmic solutions, such as the Z-Algorithm, Simulated Annealing, and the Knuth-Morris-Pratt string search, alongside foundational structures like the LRU Cache and Bounded Priority Queue. To support these additions, the repository has been standardized with Swift 4.2 compatibility, Xcode workspace configurations, and extensive unit test coverage for the new components.

Features

Add All-Pairs Shortest Paths algorithm via Xcode project and playground

The All-Pairs Shortest Paths (APSP) algorithm is introduced as a new feature, specifically implementing the Floyd-Warshall algorithm to compute shortest paths between all pairs of vertices in a weighted directed graph. This change adds the core Swift implementation (\FloydWarshall.swift\), a public header (\APSP.h\), and a protocol-based interface (\APSP.swift\) for algorithm abstraction. To support development and testing, the update includes a complete Xcode project structure (\project.pbxproj\), a Swift playground (\Contents.swift\) demonstrating usage with a sample graph, and a dedicated test suite (\APSPTests.swift\) that validates path and distance calculations against known examples.

All-Pairs Shortest Paths/APSP · high confidence

Add Array2D struct for grid-based data storage

Introduces a new \Array2D\<T\>\ struct that provides a convenient, O(1) way to store and access two-dimensional grid data (such as game boards) using explicit \column\ and \row\ subscripts with built-in range checking.

Array2D · high confidence

Add Bellman-Ford algorithm for Single-Source Shortest Paths with negative edge weights

A new implementation of the Bellman-Ford algorithm has been added to the Single-Source Shortest Paths (Weighted) module. This feature allows users to compute shortest paths in directed graphs that may contain negative edge weights, while also detecting negative weight cycles that would otherwise make shortest paths undefined. The change includes the core \BellmanFord\ struct and \BellmanFordResult\ types, along with a comprehensive test suite (\SSSPTests.swift\) and a playground example demonstrating usage. The implementation adheres to the existing \SSSPAlgorithm\ and \SSSPResult\ protocols, ensuring consistency with other shortest-path algorithms in the library.

Single-Source Shortest Paths (Weighted) · high confidence

Add Bounded Priority Queue implementation

Introduces a new Bounded Priority Queue data structure implemented as a sorted doubly linked list. The queue maintains a fixed maximum capacity; when the queue is full, adding a new element triggers the removal of the least important (lowest priority) element. The implementation includes the \BoundedPriorityQueue\ class with \enqueue\, \dequeue\, and \peek\ operations, along with a \LinkedListNode\ helper class.

Bounded Priority Queue, Huffman Coding · high confidence

Add Boyer-Moore-Horspool string search algorithm

A new Swift playground has been added that implements the Boyer-Moore-Horspool string search algorithm. The implementation extends the String type with an index(of:usingHorspoolImprovement:) method that supports both standard and improved (Horspool) search strategies, allowing users to find substrings with optimized skipping logic.

Boyer-Moore-Horspool, Boyer-Moore-Horspool/BoyerMooreHorspool.playground · high confidence

Add Count Occurrences algorithm for sorted arrays

A new 'Count Occurrences' algorithm has been added, providing an O(log n) method to count how many times a value appears in a sorted array. The implementation uses two binary searches to find the left and right boundaries of the target value, which is significantly faster than a linear search for large datasets.

Count Occurrences · high confidence

Add Count Occurrences algorithm playground

A new Swift playground has been added that demonstrates an algorithm to count the occurrences of a specific element in a sorted array. The implementation uses binary search to find the left and right boundaries of the target value, allowing for an efficient O(log n) lookup rather than a linear scan. The file includes a basic test case and a randomized test loop to verify edge cases.

Count Occurrences/CountOccurrences.playground · high confidence

Add CounterClockWise algorithm to determine polygon orientation

Added a new CounterClockWise (CCW) algorithm implementation in Swift that uses the Shoelace formula to determine whether a sequence of 2D points forms a clockwise, counter-clockwise, or parallel orientation. The change includes the core \ccw\ function and \Point\ struct, along with a Swift playground and documentation (README) explaining the geometric logic and examples for triangles, quadrilaterals, and pentagons.

CounterClockWise · high confidence

Add Counting Sort algorithm and documentation

A new Counting Sort implementation for integer arrays has been added to the Swift Algorithm Club. The change includes the \CountingSort.swift\ file, which provides a stable, non-comparative sorting algorithm that counts element frequencies to determine positions, and a \README.markdown\ file that explains the three-step process, provides code examples, and details the O(n+k) time and O(n) space complexity.

Counting Sort · high confidence

Add GCD and LCM algorithms with multiple implementations

The GCD and LCM algorithms are now available in the playground, offering users three distinct approaches to calculate the greatest common divisor: an iterative Euclidean method, a recursive Euclidean method, and a binary recursive Stein algorithm. Additionally, the least common multiple is implemented with error handling for zero inputs, allowing users to experiment with different algorithmic strategies for these fundamental number theory operations.

GCD/GCD.playground · high confidence

Add Graph playground demonstrating adjacency matrix and list implementations

A new playground file, Graph/Graph.playground, has been added to demonstrate the Graph data structure. It creates instances of both AdjacencyMatrixGraph and AdjacencyListGraph, builds a directed graph with weighted edges, and retrieves edge weights, providing a practical example of how to use the Graph implementation.

Graph/Graph.playground · high confidence

Add Hash Set data structure

A new \HashSet\<T\>\ type is introduced, providing a collection that stores unique elements with O(1) average time complexity for insert, remove, and contains operations. The implementation uses a dictionary internally and supports standard set operations including union, intersection, and difference, along with utility methods like \allElements()\ and \count\. This allows users to manage unique collections of \Hashable\ types efficiently.

Hash Set, Hashed Heap · high confidence

Add Hash Set playground with set operations

A new Swift playground named 'Hash Set' has been added, demonstrating the creation of a Hash Set and its core operations. The example covers inserting elements, checking for existence, removing items, and performing set theory operations including union, intersection, and difference on integer sets.

Hash Set/HashSet.playground · high confidence

Add Heap Sort algorithm implementation

Introduced a new Heap Sort algorithm, providing both an in-place \sort()\ method on the existing \Heap\ struct and a standalone \heapsort\ helper function. This allows users to sort arrays using a max-heap structure, achieving O(n log n) performance. The implementation includes detailed documentation in the README explaining the algorithm's steps, performance characteristics, and usage examples.

(repo-wide) · high confidence

Add Heap data structure implementation

A new \Heap\ struct is introduced, providing a generic binary heap implementation that supports both min-heap and max-heap ordering via a custom comparison function. The implementation includes core operations such as \insert\, \remove\, \replace\, and \peek\, along with internal helper methods like \shiftUp\ and \shiftDown\ to maintain the heap property. A corresponding \README\ file provides documentation on the heap's properties, usage, and performance characteristics.

Heap, Skip-List · high confidence

Add Insertion Sort playground with generic and Comparable implementations

A new playground for the Insertion Sort algorithm has been added. It provides two overloads: a generic version that accepts a custom comparison function and a convenience version for types conforming to the Comparable protocol. The implementation includes a demonstration array and print statements to showcase sorting in ascending, descending, and custom orders.

Insertion Sort/InsertionSort.playground · high confidence

Add LRU Cache implementation and playground

Users can now use a Least Recently Used (LRU) cache implementation in Swift. The change introduces a generic \LRUCache\ class that enforces a maximum size by evicting the least recently used items when the cache is full. The implementation uses a hash map for O(1) lookups and a doubly linked list to track access order. A corresponding Swift playground is also added to demonstrate usage, including \get\ and \set\ operations and eviction behavior.

LRU Cache, Myers Difference Algorithm, Radix Tree · high confidence

Add Longest Common Subsequence algorithm with tests and playground

Introduces the Longest Common Subsequence algorithm as a new feature, providing a \longestCommonSubsequence\ extension on \String\ that uses dynamic programming and backtracking to find the longest common subsequence between two strings. This includes a Swift source file with the implementation, a Swift playground for interactive exploration, and a comprehensive test suite covering edge cases such as empty strings, non-matching strings, and non-commutative behavior.

Longest Common Subsequence · high confidence

Add Minimum Coin Change algorithm in Swift

Introduces a new Minimum Coin Change problem implementation in Swift, providing both a greedy and a dynamic programming approach to find the minimum number of coins for a given value. The change includes the core algorithm logic, a README explaining the problem and solutions, and a test suite to verify the implementations.

MinimumCoinChange · high confidence

Add Monty Hall problem simulation and explanation

Added a new interactive Swift playground that simulates the Monty Hall problem, demonstrating that switching doors increases the probability of winning from 33% to 67%. The entry includes the simulation code, supporting workspace files, and a detailed README explaining the non-intuitive probability result.

Monty Hall Problem · high confidence

Add Multiset data structure with subset and equality support

A new Multiset implementation is introduced for Swift, allowing storage of duplicate elements with O(1) membership testing. The struct supports initialization from a collection of Hashables, array literals, and provides methods to add, remove, and count elements. It also includes an isSubSet check and conforms to Equatable, enabling direct comparison of two multisets for equality.

Multiset · high confidence

Add Octree data structure and interactive playground

Introduced an Octree implementation in Swift, featuring a 3D spatial partitioning algorithm that recursively subdivides space into eight child nodes. The change includes the core Octree and Box classes for managing 3D regions and points, along with a new Xcode playground that provides an interactive environment for experimenting with the algorithm.

Octree · high confidence

Add OrderedArray data structure

Introduces an OrderedArray type that maintains its elements in sorted order, automatically inserting new items in their correct position. The implementation uses a binary search algorithm to efficiently locate the insertion point, providing a sorted array wrapper with standard collection operations like insert, remove, and count.

Ordered Array · high confidence

Add Quicksort algorithm with multiple partitioning strategies

Added a new Quicksort implementation in Swift, featuring a simple recursive version and several in-place partitioning schemes: Lomuto, Hoare, randomized, and Dutch national flag. The addition includes a comprehensive test suite in QuicksortTests.swift that validates each variant against empty, single-element, duplicate, and random arrays, supported by shared test helpers for sorting verification.

Quicksort · high confidence

Add Run-Length Encoding implementation and tests

Added a new Run-Length Encoding (RLE) algorithm for compressing and decompressing byte data. The change introduces \compressRLE()\ and \decompressRLE()\ methods on \Data\ objects, following a PCX-inspired format where runs of repeated bytes are encoded with a count header. A comprehensive test suite in the playground verifies correctness across empty inputs, single bytes, byte runs, and random data.

(repo-wide) · high confidence

Add Segment Tree and Lazy Propagation implementations

Added a generic Segment Tree implementation supporting point updates and range queries, along with a separate Lazy Propagation variant that supports efficient interval updates. The generic Segment Tree allows users to pass a custom associative function (e.g., sum, min, max, GCD) to define how node values are combined. The Lazy Propagation implementation introduces a \pushDown\ mechanism to defer updates to child nodes, enabling O(log n) time complexity for both interval updates and queries.

Segment Tree · high confidence

Add Shell Sort algorithm and tests

The Shell Sort algorithm is introduced to the library, including the core implementation in Swift, a playground for interactive exploration, and a corresponding unit test suite to verify its sorting behavior.

Shell Sort · high confidence

Add Shunting Yard algorithm implementation and documentation

The Shunting Yard algorithm is now available as a new feature, providing a way to convert infix expressions (like 4 + 4 \* 2 / ( 1 - 5 )) into postfix notation (Reverse Polish Notation). This includes the core Swift implementation in ShuntingYard.swift, a playground for interactive testing, and a detailed README explaining the algorithm's logic, operator precedence, and associativity rules.

Shunting Yard · high confidence

Add Sorted Set data structure with k-th largest/smallest queries

Introduces a new Sorted Set collection that maintains its elements in sorted order, allowing for O(1) access to the minimum, maximum, and k-th smallest or largest elements. The implementation uses a binary search for lookups and includes example playgrounds demonstrating usage with integers and custom Player objects.

Sorted Set · high confidence

Add Sparse Table data structure for efficient range queries

Introduced a new Sparse Table implementation in Swift that supports fast range queries (such as min, max, GCD, and boolean operations) over an array. The \SparseTable\ class precomputes answers for intervals of power-of-two widths, allowing each query to be answered in O(1) time after O(N log N) preprocessing. The addition includes the core \SparseTable\ class, a detailed Markdown guide explaining the algorithm and idempotency requirements, and a playground with examples for integers, doubles, booleans, and bitwise operations.

Sparse Table · high confidence

Add Swift 4.2-compatible Bloom Filter playground

A new interactive playground for the Bloom Filter algorithm has been added, providing a Swift 4.2-compatible implementation. The file includes a generic \BloomFilter\ class with methods for inserting and querying elements, along with two specific hash functions (djb2 and sdbm) and a test case demonstrating usage.

Bloom Filter/BloomFilter.playground · medium confidence

Add Swift Playgrounds for Hash Table and HashSet implementations

A new Swift playground named 'HashTable' has been added to the repository, providing an interactive environment to explore hash values and the behavior of a generic HashTable collection. The playground demonstrates basic operations such as inserting, updating, and removing key-value pairs, as well as inspecting the internal state of the hash table. This addition serves as a practical example for users to understand and experiment with hash-based data structures in Swift.

Hash Table/HashTable.playground · high confidence

Add Swift implementation of Linked List data structure

A new Linked List implementation is added to the Swift Algorithm Club, providing a doubly-linked list structure with head, tail, and node management. The implementation includes methods for appending and inserting nodes, accessing elements by index, and removing nodes, along with computed properties for count and emptiness checks.

Linked List/LinkedList.playground · high confidence

Add Swift implementation of the Closest Pair of Points algorithm

A new Swift playground has been added to the Closest Pair directory, implementing the Closest Pair of Points algorithm using a divide-and-conquer approach. The code includes a recursive function that splits the point set, solves subproblems, and merges results by checking a central strip, achieving O(n log n) complexity. The directory also includes a README explaining the algorithm's steps and a supporting image, providing a complete, runnable example of the algorithm in a Swift environment.

Closest Pair · high confidence

Add Swift implementation of the Dining Philosophers algorithm

Introduces a new Swift source file implementing the Dining Philosophers concurrency problem. The code uses DispatchSemaphores to manage fork access, with logic to acquire forks in a specific order to prevent deadlock. It spawns background threads for each philosopher and uses a global semaphore to keep the main thread alive.

DiningPhilosophers/Sources · high confidence

Add Swift implementation of the Miller-Rabin probabilistic primality test

Users can now test for the primality of large integers using the Miller-Rabin algorithm. The change introduces a Swift implementation that determines if a number is 'probably prime' or definitely composite, with an adjustable accuracy parameter to control the number of iterations. The addition includes the core logic for modular exponentiation and a playground for interactive testing.

Miller-Rabin Primality Test · high confidence

Add Swift playground and unit tests for the QuadTree algorithm

The QuadTree algorithm is now available as a Swift playground for interactive exploration, and a corresponding unit test suite has been added to verify the behavior of the \Rect\ and \QuadTree\ implementations, including point containment, rectangle intersection, and tree insertion and query operations.

QuadTree · high confidence

Add Swift playground with Deque implementation

A new Swift playground has been added to demonstrate a basic Deque (double-ended queue) data structure. The implementation supports adding and removing elements from both the front and back of the queue, providing a practical example for users to explore Swift collections and algorithms.

Deque/Deque.playground · high confidence

Add Threaded Binary Tree implementation and documentation

Introduces a new Threaded Binary Tree data structure in Swift, including the core \ThreadedBinaryTree\ class with support for in-order traversal via predecessor and successor pointers. The change adds the full implementation, a Swift playground for interactive testing, and a comprehensive README explaining the algorithm, node representation, and traversal methods.

Threaded Binary Tree · high confidence

Add Z-Algorithm for linear-time string matching

A new Z-Algorithm implementation is added to the Swift Algorithm Club, providing a linear-time string matching algorithm. The change introduces a \ZetaAlgorithm\ function that computes a Z-array for pattern pre-processing, and extends the \String\ type with an \indexesOf(pattern:)\ method that returns the indices of all occurrences of a given pattern. The implementation is based on Dan Gusfield's work and includes a playground for interactive testing.

Z-Algorithm · high confidence

Add algorithms to find minimum, maximum, and both in an array

Added Swift implementations for finding the minimum and maximum values in an array, including a paired comparison approach that finds both values in a single pass. The change includes the source files (Minimum.swift, Maximum.swift, MinimumMaximumPairs.swift), a README with examples and performance notes, a playground for interactive testing, and a full set of unit tests verifying correctness against Swift's standard library.

Select Minimum Maximum · high confidence

Add binary tree encoding and decoding implementation

Introduced a new \BinaryNodeCoder\ class that serializes a binary tree into a comma-separated string using pre-order traversal and reconstructs the tree from that string. The implementation includes a \BinaryNode\ class with left and right child references, a \preOrderTraversal\ method, and the core \encode\ and \decode\ logic that uses 'X' to represent nil nodes.

Encode and Decode Tree · high confidence

Add general-purpose Tree data structure

A new general-purpose Tree implementation is introduced, featuring a TreeNode class with public access that supports hierarchical relationships via parent and children links. The implementation includes a description for string representation and a recursive search method to locate nodes by value, accompanied by a corresponding playground and documentation.

Tree · high confidence

Add genetic algorithm tutorial and implementation

A new genetic algorithm example has been added to the Genetic directory, featuring a Swift implementation (gen.swift) that evolves a random string to match 'Hello, World!'. The addition includes a comprehensive README (README.markdown) explaining the core concepts of selection, crossover, and mutation, alongside the executable code that demonstrates these processes.

Genetic · high confidence

Add iOS app shell for the Convex Hull algorithm

The Convex Hull algorithm is now presented as a standalone iOS application. This change introduces the necessary iOS infrastructure, including the app delegate, launch screen, and view controller, to render and visualize the convex hull of random points on an iPhone or iPad.

Convex Hull/Convex Hull · high confidence

Add optimized Queue implementation and unit tests

Introduces a new optimized Queue implementation (Queue-Optimized.swift) that provides O(1) average-time complexity for both enqueue and dequeue operations, alongside a simple baseline implementation (Queue-Simple.swift). The change also includes a Swift playground for interactive exploration and a comprehensive set of unit tests (QueueTests.swift) to verify queue behavior, including empty states, element insertion, removal, and front-access.

Queue · high confidence

Add randomized selection algorithm for finding the k-th largest element

A new file, kthLargest.swift, has been added to the Kth Largest Element playground. It provides two public functions: kthLargest, which returns the k-th largest element by sorting, and randomizedSelect, which uses a randomized quicksort-like approach to find the k-th smallest element in expected O(n) time. The implementation uses Int.random for pivot selection, consistent with Swift 4.2+ APIs.

Kth Largest Element/kthLargest.playground/Sources · high confidence

Add randomized selection algorithm for k-th smallest element

The Kth Largest Element playground now includes a randomized selection algorithm for finding the k-th smallest element, alongside the existing kthLargest function. Users can now explore both approaches within the same example file.

Kth Largest Element/kthLargest.playground · high confidence

Add selection sampling algorithms and documentation

Introduces three algorithms for selecting k random items from a collection: a fast O(k) method that does not preserve original order, a reservoir sampling approach for large or streaming data, and a probability-based method that preserves the original element order. The change includes the Swift implementation, a detailed README explaining the algorithms and their trade-offs, and a playground for interactive testing.

Selection Sampling · high confidence

A new simple example page was added to the Breadth-First Search playground, demonstrating a basic BFS implementation that explores nodes in a graph and returns the sequence of visited nodes.

Breadth-First Search/BreadthFirstSearch.playground/Pages · high confidence

Add simulated annealing algorithm for optimization problems

Users can now solve optimization problems, such as the Travelling Salesman Problem, using the simulated annealing metaheuristic. This new Swift implementation allows users to find approximate global maxima in large search spaces by escaping local maxima through temperature-controlled acceptance of worse solutions during the cooling process.

Simulated annealing · high confidence

Add top-down and bottom-up Merge Sort implementations in Swift

Added a new Merge Sort algorithm implementation in Swift, featuring both a top-down recursive approach and a bottom-up iterative approach. The top-down version recursively splits the array and merges sorted subarrays, while the bottom-up version iteratively merges subarrays of increasing width using double-buffering. The change includes the Swift source file, a playground for interactive testing, and a README explaining the algorithm and providing code examples.

Merge Sort · high confidence

Added A\* pathfinding algorithm implementation

The A-Star directory now includes a complete implementation of the A\* search algorithm in Swift, featuring a public \AStar\ class that accepts a graph and a heuristic function to find optimal paths. This addition is accompanied by a detailed README explaining the algorithm's mechanics and a series of DOT graph files that visually illustrate the step-by-step execution of the search. Additionally, a comprehensive test suite has been added to verify the algorithm's correctness on grid-based graphs, alongside the necessary Xcode project configuration files to support the new test target.

A-Star · high confidence

Added Array2D playground for grid-based algorithms

A new playground file was added to demonstrate the Array2D data structure, which provides a two-dimensional array with a fixed number of rows and columns. The implementation uses a single underlying array for O(1) access and includes preconditions to validate column and row indices, making it suitable for grid-based applications like games.

Array2D/Array2D.playground · high confidence

Added B-Tree implementation and demo playground

A new B-Tree data structure implementation is now available in the Swift playgrounds, accompanied by a demo playground that demonstrates inserting, retrieving, and removing keys, as well as traversing the tree in order. This provides a ready-to-run example of the B-Tree algorithm in action.

B-Tree/BTree.playground · high confidence

Added Binary Search implementation and examples

A new Binary Search playground has been added, providing both recursive and iterative Swift implementations for searching sorted arrays. The example demonstrates searching for various keys, including cases where the key is not found.

Binary Search/BinarySearch.playground · high confidence

Added Bounded Priority Queue implementation

A new Bounded Priority Queue data structure has been added to the Sources directory. This implementation uses a doubly linked list to maintain a sorted sequence of elements with a fixed maximum capacity. It supports enqueueing items by priority, peeking at the highest priority element, and dequeuing the highest priority item. When the queue reaches its capacity, the least important element is automatically removed to make room for new entries.

(repo-wide) · high confidence

Added Bounded Priority Queue playground example

A new playground example for the Bounded Priority Queue has been added, demonstrating how to create and use a priority queue that maintains a fixed maximum number of elements. The example includes a Message struct with name and priority fields, along with comparison operators, and shows enqueuing, peeking, dequeuing, and handling overflow scenarios where lower-priority items are automatically removed.

Bounded Priority Queue/BoundedPriorityQueue.playground, Fixed Size Array/FixedSizeArray.playground, Huffman Coding/Huffman.playground · high confidence

Added Brute-Force String Search playground

A new Swift playground demonstrates a brute-force string search algorithm. It extends the String type with an \indexOf\ method that scans for a pattern, including support for multi-byte characters like emojis.

Brute-Force String Search/BruteForceStringSearch.playground, Depth-First Search/DepthFirstSearch.playground · high confidence

Added Bucket Sort implementation and supporting types

Users can now sort arrays of comparable, integer-convertible elements using the bucket sort algorithm. This change introduces the main \bucketSort\ function along with supporting protocols and structs (\Distributor\, \Sorter\, \Bucket\, \RangeDistributor\, \InsertionSorter\) that enable flexible distribution and in-bucket sorting strategies.

Bucket Sort/BucketSort.playground/Sources · high confidence

Added Depth-First Search algorithm implementation and documentation

Introduced a new recursive implementation of the Depth-First Search (DFS) algorithm for traversing or searching tree or graph data structures. The change includes the Swift source code for the DFS function and a comprehensive README guide that explains the algorithm's mechanics, provides an animated example, and demonstrates usage with a sample graph.

Depth-First Search · high confidence

Added Dijkstra's algorithm implementation for finding shortest paths

Users can now use the new Dijkstra class to calculate shortest paths in a graph. The implementation includes a Dijkstra class that manages a set of Vertex objects, providing a findShortestPaths method to compute distances and paths from a starting vertex. The Vertex class supports neighbor relationships, path tracking, and is made Hashable and Equatable to allow use in sets and equality checks.

Dijkstra Algorithm/Dijkstra.playground/Sources · high confidence

Added Dijkstra's algorithm playgrounds for Swift

New Swift playgrounds have been added to demonstrate Dijkstra's algorithm. The 'Dijkstra' playground provides a headless implementation that generates a random graph and computes shortest paths. The 'VisualizedDijkstra' playground offers an interactive, visual representation of the algorithm, allowing users to step through the process and observe how shortest paths are calculated on a graph.

Dijkstra Algorithm/Dijkstra.playground · high confidence

Added Egg Drop Problem solution in Swift

Introduced a new algorithmic problem, the Egg Drop Problem, with a Swift implementation that calculates the minimum number of attempts required to determine the highest floor from which an egg can be dropped without breaking. The solution uses dynamic programming to optimize the search across multiple eggs and floors, accompanied by a detailed README explaining the logic and an example.

Egg Drop Problem · high confidence

Added Fizz Buzz puzzle implementation

A new Fizz Buzz puzzle has been added to the Swift playground, providing a reference implementation that prints 'Fizz' for multiples of 3, 'Buzz' for multiples of 5, and 'Fizz Buzz' for multiples of both, using a switch statement to handle the four possible cases.

Fizz Buzz/FizzBuzz.playground · high confidence

Added HashTable struct with CustomStringConvertible support

A new HashTable generic struct has been added to the Sources directory, implementing a fixed-capacity hash table using separate chaining for collision resolution. The implementation includes standard operations (insert, update, remove, search) and conforms to CustomStringConvertible, providing human-readable string representations for both standard and debug output.

Hash Table/HashTable.playground/Sources · high confidence

Added Haversine distance calculation playground

A new Swift playground was added to calculate the distance between two geographic coordinates using the Haversine formula. The implementation includes helper functions for angle conversion and trigonometric calculations, and demonstrates the function with example coordinates for Amsterdam and New York.

HaversineDistance/HaversineDistance.playground · high confidence

Added Introsort implementation with Quicksort, Heapsort, and InsertionSort components

The Introsort directory now contains a complete implementation of the Introsort algorithm, which combines Quicksort, Heapsort, and InsertionSort. The code introduces \IntroSort.swift\ as the main entry point, \Partition.swift\ for the Quicksort partitioning logic, \HeapSort.swift\ for the fallback sorting method, and \InsertionSort.swift\ for small partitions. Supporting utilities include \Sort3.swift\ for median-of-three pivot selection and \Randomize.swift\ for generating test data. This provides a functional, multi-algorithm sorting solution within the Introsort module.

Introsort · high confidence

Added Introsort playground with hybrid sorting implementation

Introduced a new Swift playground demonstrating the Introsort algorithm, which combines quicksort, heapsort, and insertion sort. The implementation uses quicksort by default, switches to heapsort when recursion depth exceeds a logarithmic limit to prevent worst-case O(n^2) behavior, and falls back to insertion sort for small partitions (size \< 20) to leverage its efficiency on nearly sorted data. The change includes the main entry point, helper functions for partitioning, heap operations, and utility functions for randomization and sorting.

Introsort/Introsort.playground · high confidence

Added Karatsuba Multiplication algorithm

Added a new implementation of the Karatsuba multiplication algorithm, which multiplies large numbers more efficiently than the standard long multiplication approach. The change includes the Swift source file containing both the traditional long multiplication and the recursive Karatsuba algorithm, along with a README file that explains the mathematical background, provides examples, and compares the O(n^2) complexity of long multiplication with the O(n^log2(3)) complexity of Karatsuba multiplication.

Bubble Sort/MyPlayground.playground, Karatsuba Multiplication, Set Cover (Unweighted) · medium confidence

Added Knuth-Morris-Pratt string search algorithm

Introduced a new Knuth-Morris-Pratt algorithm implementation in Swift, providing an \indexesOf\ extension on \String\ to find all occurrences of a pattern within a text. The solution includes the core \KnuthMorrisPratt.swift\ file and a detailed \README.markdown\ explaining the linear-time string matching logic.

Knuth-Morris-Pratt · high confidence

Added Linear Search algorithm example

A new Swift playground was added that demonstrates a generic linear search function. The implementation iterates through an array of equatable elements, returning the index of the first match or nil if the element is not found.

Linear Search/LinearSearch.playground · high confidence

Added Minimum Spanning Tree (Unweighted) algorithm and tests

Introduced a new algorithm for computing the minimum spanning tree of an unweighted graph using a modified breadth-first search. The change includes the core implementation in \MinimumSpanningTree.swift\, supporting \Graph\, \Node\, \Edge\, and \Queue\ classes, along with a comprehensive test suite in \Tests/\ that verifies the algorithm's behavior on various graph structures.

Minimum Spanning Tree (Unweighted) · high confidence

Added Minimum Spanning Tree algorithms (Kruskal's and Prim's) with supporting data structures

Introduced implementations of Kruskal's and Prim's algorithms for finding the minimum spanning tree of a weighted, undirected graph. The change includes the core algorithmic functions in Kruskal.swift and Prim.swift, along with necessary supporting data structures: a generic Graph type, a Union-Find structure for cycle detection in Kruskal's, and a Priority Queue backed by a Heap for edge selection in Prim's. A Swift playground (Contents.swift) demonstrates usage with a sample graph, and a README provides explanations of both algorithms.

Minimum Spanning Tree · high confidence

Added Naive Bayes Classifier with Gaussian and Multinomial implementations

Introduced a new Naive Bayes classifier supporting both Gaussian (for continuous features) and Multinomial (for categorical features) models. The implementation includes the core classification logic, helper extensions for statistical calculations, and a Swift playground demonstrating usage with wine and golf datasets.

Naive Bayes Classifier · high confidence

Added Ordered Set implementation and playground

Introduced a new Ordered Set data structure implemented in Swift, featuring O(1) add, set, and indexOf operations alongside O(n) insert and remove operations. The change includes the core OrderedSet class, a corresponding playground with usage examples, and updated documentation in the README.

Ordered Set · high confidence

Added Selection Sort algorithm with Swift implementation and tests

The Selection Sort algorithm has been added to the library, providing a Swift implementation that sorts an array from low to high (or high to low) by repeatedly finding the lowest number in the unsorted portion and swapping it into the sorted portion. This change includes the core \SelectionSort.swift\ file, a \README.markdown\ explaining the algorithm and performance characteristics, a Swift playground for interactive testing, and a dedicated test suite (\SelectionSortTests.swift\) to verify the sorting behavior.

Selection Sort · high confidence

Added Strassen's Matrix Multiplication algorithm

A new Swift playground has been added to demonstrate Strassen's algorithm for matrix multiplication. The change includes a \Matrix\ struct with standard multiplication, a \strassenMatrixMultiply\ method implementing the divide-and-conquer approach, and supporting protocols (\Number\, \Addable\, \Multipliable\) to enable generic numeric operations.

Strassen Matrix Multiplication · high confidence

Added Swift 4 compatibility and test suite for the Shortest Path (Unweighted) algorithm

The Shortest Path (Unweighted) algorithm has been updated to support Swift 4, including a new playground example and a comprehensive test suite. The implementation now includes a \breadthFirstSearchShortestPath\ function that computes shortest paths in unweighted graphs using a queue-based traversal. The addition includes supporting data structures (Graph, Node, Edge, Queue) and unit tests that verify distance calculations for both tree and general graph structures, ensuring the algorithm correctly identifies the shortest path from a source node to all other nodes.

Shortest Path (Unweighted) · high confidence

Added Swift 4.2 genetic algorithm tutorial

A new interactive Swift playground demonstrates a genetic algorithm that evolves a population of strings to match the target 'Hello, World'. The implementation includes helper functions for random population generation, fitness calculation, weighted selection, crossover, and mutation, all written in Swift 4.2 syntax.

Genetic/gen.playground · high confidence

Added Swift implementation and tests for palindrome checking

A new Swift implementation of a palindrome-checking algorithm has been added, featuring a public \isPalindrome\ function that strips non-word characters and compares characters from both ends of the string. The change includes the core logic in \Palindrome.swift\, a playground \Contents.swift\ for interactive exploration, and a comprehensive test suite in \Test.swift\ that validates various inputs including sentences, numbers, and special characters.

Palindromes · high confidence

Added Swift playground demonstrating AVL tree operations

A new Swift playground was added to demonstrate the usage of an AVL tree data structure. The example code shows how to instantiate an AVL tree, insert key-value pairs, search for nodes, and delete elements, providing a practical reference for users exploring this algorithm.

AVL Tree/AVLTree.playground · high confidence

Added Swift playground example for immutable Binary Search Tree

A new Swift playground example was added to demonstrate an immutable Binary Search Tree implementation. The example shows how to create a tree by repeatedly inserting values (7, 2, 5, 10, 1) and performing search operations, highlighting that each insertion returns a new tree instance rather than modifying the existing one.

Binary Search Tree/Solution 2/BinarySearchTree.playground · high confidence

Added Swift playground example for the Egg Drop Problem

A new Swift playground has been added to demonstrate the solution to the Egg Drop Problem. The example includes a \drop\ function that calculates the minimum number of drops required for various combinations of eggs and floors, with inline comments showing the expected answers for each test case.

Egg Drop Problem/EggDrop.playground · high confidence

Added Swift playground for 3Sum algorithm

Introduced a new Swift playground containing the implementation for the 3Sum problem. The code includes helper extensions on Collection and BidirectionalCollection to skip duplicate elements, and a generic function that finds all unique triplets in a sorted collection that sum to a target value. This provides a ready-to-run example of the algorithm.

3Sum and 4Sum/3Sum.playground, 3Sum and 4Sum/4Sum.playground · high confidence

Added Treap data structure implementation and test suite

Introduced a new Treap (tree+heap) implementation in Swift, providing a balanced binary search tree with random priority. The change adds the core \Treap\ enum with \set\, \delete\, \get\, and \contains\ operations, along with helper functions for rotation and merging. It also includes a \MutableCollection\ extension enabling subscript access by key and index-based iteration, plus a \TreapIndex\ for traversal. A corresponding test suite (\TreapTests.swift\) validates basic insertion, deletion, and balance properties.

Treap · high confidence

Added Two-Sum Problem with two Swift solutions

Introduced the Two-Sum Problem with a README explaining two O(n) time-complexity approaches: a dictionary-based solution that finds two numbers in an unsorted array, and a two-pointer solution that requires a sorted array. The change includes the explanatory markdown and the corresponding Swift playground files for both solutions.

Two-Sum Problem · high confidence

Added Xcode project configuration and test scheme for the Convex Hull app

The Xcode project file (project.pbxproj) was added, defining the main application target and a separate unit test target (Tests.xctest) with associated build phases and file references. Additionally, an Xcode workspace configuration and a dedicated test scheme (Tests.xcscheme) were introduced, enabling the execution of unit tests within the Xcode environment.

Convex Hull/Convex Hull.xcodeproj · high confidence

Added Xcode workspace and source control configuration for the Kth Largest Element playground

The project now includes an Xcode workspace file (contents.xcworkspacedata) and a source control blueprint (kthLargest.xcscmblueprint) for the Kth Largest Element playground. This configures the workspace to reference the local project and sets up Git tracking for the swift-algorithm-club and CuteSticker remote repositories, enabling proper version control and IDE integration for this specific playground.

Kth Largest Element/kthLargest.playground/playground.xcworkspace · high confidence

Added Xcode workspace configuration files

The workspace configuration files (contents.xcworkspacedata and IDEWorkspaceChecks.plist) were added to the project. This change ensures the Xcode workspace is properly configured and recognized by the IDE, facilitating correct project structure and build settings for the sorting algorithm playground.

Bucket Sort/BucketSort.playground/playground.xcworkspace · high confidence

Added Xcode workspace configuration for the Graph playground

The Graph playground now includes a properly configured Xcode workspace file (contents.xcworkspacedata) and associated IDE workspace checks (IDEWorkspaceChecks.plist). This ensures the playground opens correctly in Xcode with the correct self-reference and build settings, improving the developer experience when working with the Graph component.

GCD/GCD.playground/playground.xcworkspace, Graph/Graph.playground/playground.xcworkspace, Hash Table/HashTable.playground/playground.xcworkspace · medium confidence

The Knuth-Morris-Pratt playground now includes a Z-Algorithm implementation alongside the existing Knuth-Morris-Pratt algorithm. This adds a new method, \indexesOf\, to the \String\ extension that uses the Z-Algorithm to find all occurrences of a pattern within a text, supporting multi-byte characters such as emojis.

Knuth-Morris-Pratt/KnuthMorrisPratt.playground · high confidence

A new 'Simple Example' page was added to the Depth-First Search playground, providing a basic implementation of the DFS algorithm on a graph structure. This serves as a straightforward demonstration of how to traverse a graph using depth-first search, including graph construction and node exploration.

Depth-First Search/DepthFirstSearch.playground/Pages · high confidence

Added binary search algorithm implementation

Added a new Binary Search algorithm implementation in Swift, providing both recursive and iterative versions to efficiently locate an element in a sorted array. The code includes public functions for both approaches, with the recursive version accepting a range parameter and the iterative version using a while loop. The accompanying README explains the divide-and-conquer approach, compares performance against linear search, and provides usage examples.

(repo-wide) · high confidence

Added binary tree implementation with traversal methods

A new binary tree data structure has been added to the playground, featuring a generic enum-based node structure with a count property and a custom string description. The implementation includes three tree traversal methods: in-order, pre-order, and post-order, allowing users to process each node's value during traversal.

Binary Tree/BinaryTree.playground · high confidence

Added combinatorics playground with permutation and combination algorithms

A new Swift playground named Combinatorics has been added, providing interactive examples for calculating factorials, permutations, and combinations. The file implements several algorithms for generating permutations (including Wirth's and Sedgewick's methods) and calculating combinations (including a quick binomial coefficient and a dynamic programming approach), allowing users to experiment with these mathematical concepts directly in Xcode.

Combinatorics/Combinatorics.playground · high confidence

Added general-purpose binary tree implementation

Introduced a new, general-purpose binary tree data structure implemented as a Swift enum. The implementation includes methods for counting nodes, generating a string description, and performing in-order, pre-order, and post-order traversals.

Binary Tree · high confidence

Added optimized Deque implementation with O(1) front operations

A new optimized Deque implementation has been added alongside the existing simple version. The optimized version uses a head pointer and dynamic capacity management to ensure that enqueueing and dequeuing at both ends are O(1) operations, addressing the O(n) performance issues of the simple array-based implementation.

Deque · high confidence

Added topological sort implementation for directed acyclic graphs

The Topological Sort directory now contains a complete implementation of the topological sort algorithm for directed acyclic graphs. This includes a \Graph\ class with adjacency list support, three distinct sorting methods (\topologicalSort\, \topologicalSortKahn\, and \topologicalSortAlternative\) that order nodes based on dependencies, and a corresponding test suite (\TopologicalSortTests\) that validates the sorting logic against multiple graph configurations.

Topological Sort · high confidence

Added visual examples for Splay Tree worst-case scenarios

The Splay Tree documentation now includes a new SVG diagram illustrating worst-case scenarios for splay tree operations, providing a visual aid to understand the structure's behavior under specific conditions.

Splay Tree · high confidence

Added visualized Dijkstra's algorithm implementation with interactive UI components

The Dijkstra Algorithm playground now includes a complete, visualized implementation of the Dijkstra's shortest path algorithm. This adds a new interactive UI featuring a GraphView for rendering vertices and edges, custom UI components like EdgeRepresentation and VertexView for visualizing the graph state, and a Window controller to manage the visualization flow. Users can now see the algorithm's progress through color changes and labels, with options for auto or interactive visualization modes.

Dijkstra Algorithm/VisualizedDijkstra.playground/Sources · high confidence

Added workspace configuration files for Dijkstra algorithm playgrounds

New workspace configuration files (contents.xcworkspacedata) were added for the Dijkstra Algorithm and Visualized Dijkstra playgrounds. These files define the workspace structure, linking each playground to its respective project, ensuring they can be opened and run correctly within the Xcode environment.

Dijkstra Algorithm/Dijkstra.playground/playground.xcworkspace, Dijkstra Algorithm/VisualizedDijkstra.playground/playground.xcworkspace · high confidence

Adds 2D geometry primitives for point and line operations

The Points Lines Planes module now includes Swift implementations for 2D geometry, specifically the Point2D and Line2D structs. These provide foundational geometric operations, including calculating line intersections, determining if a point lies to the left or right of a line, and generating perpendicular lines. This adds new capabilities for 2D spatial calculations within the application.

Points Lines Planes · high confidence

Adds multiple Union-Find implementations to the Swift playground

The Union-Find directory now includes a comprehensive set of implementations for the Union-Find (Disjoint Set) data structure, provided as a Swift playground. Users can explore five distinct algorithms: Quick-Find, Quick-Union, Weighted Quick-Find, Weighted Quick-Union, and Weighted Quick-Union with Path Compression. Each implementation is available as a separate struct in the playground's source files, allowing for direct comparison of their performance characteristics and behavior.

Union-Find · high confidence

Initial project structure and tooling setup

The repository is initialized with a comprehensive set of educational articles covering algorithm design, Big-O notation, and the rationale for learning algorithms. A main README provides a navigable index of algorithms and data structures, while a script (gfm-render.sh) is added to convert Markdown files to HTML for GitHub Pages. Additionally, SwiftLint is configured via .swiftlint.yml and an installation script, and the build environment is standardized to Xcode 10 and Swift 4.2.

(repo-wide) · high confidence

Introduce BitSet type with bitwise operations

Added a new \BitSet\ struct that provides a fixed-size sequence of bits, supporting operations such as setting, clearing, and flipping individual bits, as well as bitwise AND, OR, and XOR between two sets. The implementation stores bits in an array of 64-bit words, allowing efficient bulk manipulation and comparison of bit patterns.

Bit Set/BitSet.playground/Sources · high confidence

Introduce Graph data structure with adjacency list and matrix implementations

The Graph library now includes a new AbstractGraph base class and two concrete implementations: AdjacencyListGraph and AdjacencyMatrixGraph. The core data structures, Vertex and Edge, are defined with full Hashable and Equatable conformance, enabling their use in sets and dictionaries. This provides users with two distinct graph representations to choose from based on their specific performance and memory requirements.

Graph/Graph · high confidence

Introduce Rootish Array Stack data structure with Swift implementation and tests

The Rootish Array Stack is a new ordered, array-based data structure that minimizes wasted space by using an array of fixed-size blocks, where each block's capacity matches its index. This implementation provides efficient get/set operations using mathematical formulas derived from Gauss' summation technique to calculate block indices. The change includes the core \RootishArrayStack\ struct with \insert\, \append\, and \remove\ operations, along with a playground for interactive exploration and a comprehensive set of unit tests verifying behavior for empty lists, single/multiple elements, insertion at various positions, and removal operations.

Rootish Array Stack · high confidence

Added new source files defining the foundational graph components: a Node class with label, distance, and visited state tracking; an Edge class linking nodes; and a Graph class that manages nodes and edges, including methods to add nodes and edges, find nodes by label, and create deep copies of the graph structure.

Depth-First Search/DepthFirstSearch.playground/Sources · high confidence

Introduces HashSet with set operations

A new public HashSet struct is added, providing standard set operations including insert, remove, and contains, as well as set algebra methods: union, intersection, and difference.

Hash Set/HashSet.playground/Sources · high confidence

Introduces K-Means clustering algorithm implementation

Adds a new K-Means clustering implementation in Swift, including the core \KMeans\ class and a \reservoirSample\ helper function. The implementation supports generic labels for centroids and provides methods to train centers based on input data points and convergence distance, as well as to fit new points to existing centroids.

K-Means · high confidence

Introduces a doubly linked list implementation with head, tail, and insertion/removal methods

Adds a new \LinkedList\<T\>\ class that implements a doubly linked list, providing properties for \head\, \last\, \isEmpty\, and \count\. The implementation includes methods to \append\ values or nodes, \insert\ values or nodes at specific indices, and \remove\ nodes, along with a \subscript\ for index-based access. The node structure uses weak references for the \previous\ pointer to prevent memory cycles.

Linked List · high confidence

Introduces an immutable, value-type Binary Search Tree implementation

A new BinarySearchTree.swift file has been added to the Sources directory, providing an immutable binary search tree built on Swift value types (enums) rather than classes. This implementation supports insertion, search, and traversal operations (count, height, minimum, maximum) while ensuring that modifications return new tree instances rather than mutating existing ones.

Binary Search Tree/Solution 2/BinarySearchTree.playground/Sources · high confidence

New graph data structures for the playground

The playground now includes dedicated source files for graph algorithms: a Queue implementation, and new Edge, Node, and Graph classes that define the core data structures for representing and traversing graphs.

Breadth-First Search/BreadthFirstSearch.playground/Sources · high confidence

Rabin-Karp algorithm implementation and playground

Added the Rabin-Karp string search algorithm implementation in Swift, including the core \rabin-karp.swift\ file with the \search\ function and helper methods for hashing, as well as a corresponding playground (\Contents.swift\) with test assertions to verify the algorithm's behavior.

Rabin-Karp · high confidence

Red-Black Tree implementation and documentation added

A new Red-Black Tree data structure is now available, including the core Swift implementation, a playground for interactive testing, and a comprehensive README explaining the algorithm, properties, and rotation/insertion/deletion logic. The tree supports standard operations like search, insert, delete, and finding predecessors/successors, with all nodes represented using a nullLeaf pattern for cleaner nil handling.

(repo-wide) · high confidence

Ring Buffer implementation with Sequence conformance

Added a fixed-length ring buffer data structure that provides O(1) enqueue and dequeue operations. The implementation uses a fixed-size array with separate read and write indices that increment without wrapping, using modulo arithmetic for array access. The RingBuffer struct now conforms to the Sequence protocol, allowing it to be iterated over directly. The implementation includes write and read methods that return status indicators and handle empty/full buffer states appropriately.

Ring Buffer · high confidence

Singly Linked List implementation with value semantics and copy-on-write

A new SinglyLinkedList data structure is introduced, featuring value semantics and copy-on-write optimization to prevent unnecessary deep copies. The implementation includes a KeyValuePair protocol for key-value pairs, a SinglyLinkedListNode class, and the main SinglyLinkedList struct with methods for appending, prepending, and deleting items. The change also adds a test suite in the Tests directory to verify the list's behavior, including tests for head/tail operations, duplicate removal, and k-th to last element finding.

Singly Linked List · high confidence

Stack implementation updated with Sequence conformance and tests

The Stack data structure now conforms to the Sequence protocol, allowing it to be iterated over directly. The implementation includes a playground for interactive exploration, a README with usage examples, and a comprehensive test suite in the Tests directory that verifies empty, single-element, and multi-element stack behaviors.

Stack · high confidence

The Trie data structure has been refactored to be more Swift-like, including making the class a subclass of NSObject and conforming to NSCoding for archiving. A new \findWordsWithPrefix\ method was added to support prefix-based searches, and the \contains\ method now supports an optional \matchPrefix\ parameter. Additionally, the project was converted to an Xcode project with a suite of unit tests (TrieTests) and UI tests (TrieUITests) to ensure stability and correctness.

Trie · high confidence

Behavioural changes

1 commit (0 fixes) modifying Heap Sort/Images, Heap/Images

A change to existing behaviour in Heap Sort/Images, Heap/Images — 1 commit, 30 files.

Heap Sort/Images, Heap/Images · medium confidence · unverified

10 commits (1 fix) modifying Binary Search Tree/Images

A change to existing behaviour in Binary Search Tree/Images — 10 commits (1 fix), 16 files.

Binary Search Tree/Images · medium confidence · unverified

2 commits (0 fixes) modifying Breadth-First Search/Images

A change to existing behaviour in Breadth-First Search/Images — 2 commits, 5 files.

(repo-wide) · medium confidence · unverified

Added .xcworkspace files to version control

The .xcworkspace configuration files for all Swift playgrounds (including AVL Tree, Array2D, Binary Search Tree, Bloom Filter, and others) have been added to the repository. Previously, these workspace files were likely ignored by .gitignore, meaning developers could not share the workspace configuration via version control. This change ensures that each playground's workspace state is tracked, allowing collaborators to open the projects with the correct file references.

(repo-wide) · high confidence

Added Xcode workspace check configuration

The project now includes an IDEWorkspaceChecks.plist file that configures Xcode to compute Mac 32-bit warnings, reflecting automated changes for Xcode 10 compatibility.

Bloom Filter/BloomFilter.playground/playground.xcworkspace/xcshareddata · medium confidence

Added Xcode workspace configuration files for the Hash Set playground

The Hash Set playground now includes the standard Xcode workspace files (contents.xcworkspacedata and IDEWorkspaceChecks.plist). This ensures the project opens correctly in Xcode without generating workspace-level warnings or errors, providing a smoother experience for users opening the project in the Xcode IDE.

Hash Set/HashSet.playground/playground.xcworkspace · high confidence

Added Xcode workspace configuration files for the Swift 4.2 update

The project now includes the necessary Xcode workspace metadata files (contents.xcworkspacedata and IDEWorkspaceChecks.plist) to support the migration to Swift 4.2. These files ensure the workspace is correctly configured for the updated Swift version and resolves previous issues where these configuration files were not tracked in version control.

Breadth-First Search/BreadthFirstSearch.playground/playground.xcworkspace · medium confidence

Added Xcode workspace configuration for the Binary Tree playground

The Binary Tree playground now includes an Xcode workspace file (contents.xcworkspacedata) and an IDE workspace check plist (IDEWorkspaceChecks.plist). This ensures the playground opens correctly in Xcode and suppresses the 32-bit warning, providing a smoother development experience for users working with the binary tree implementation.

(repo-wide) · medium confidence

Added workspace check files for Dijkstra algorithm playgrounds

Added IDEWorkspaceChecks.plist files to the Dijkstra Algorithm and VisualizedDijkstra playground workspaces. These files configure the workspace to track the state of the Xcode project, specifically enabling the IDEDidComputeMac32BitWarning flag, which helps manage 32-bit build warnings in the playground environments.

Dijkstra Algorithm/Dijkstra.playground/playground.xcworkspace/xcshareddata, Dijkstra Algorithm/VisualizedDijkstra.playground/playground.xcworkspace/xcshareddata · medium confidence

Added workspace configuration files for Binary Search Tree solutions

Added IDE workspace check files for the Binary Search Tree solutions 1 and 2, enabling proper workspace state tracking in Xcode.

Binary Search Tree/Solution 1/BinarySearchTree.playground/playground.xcworkspace/xcshareddata, Binary Search Tree/Solution 2/BinarySearchTree.playground/playground.xcworkspace/xcshareddata · medium confidence

Added workspace configuration files for the BitSet playground

The project now includes the standard Xcode workspace configuration files (contents.xcworkspacedata and IDEWorkspaceChecks.plist) for the BitSet playground. This ensures the workspace is properly recognized by Xcode and that the 32-bit memory warning is explicitly acknowledged.

Bit Set/BitSet.playground/playground.xcworkspace · high confidence

BitSet playground adds bit shift operations

The Bit Set playground has been updated to demonstrate bit shift operations (left and right shifts) on BitSet instances, alongside existing bitwise and state-checking methods.

Bit Set/BitSet.playground · high confidence

Immutable binary search tree implementation

The binary search tree solution has been replaced with an immutable, value-type implementation using a Swift enum. This new version supports insert, search, and contains operations, and includes methods to find the minimum and maximum values in the tree.

Binary Search Tree/Solution 2 · high confidence

Introduced class-based Binary Search Tree with parent tracking

The Binary Search Tree implementation has been refactored to use a class-based structure, allowing nodes to maintain references to their parent, left, and right children. This change simplifies the removal logic by enabling direct parent node updates during deletion, and adds properties to check node status (e.g., isRoot, isLeaf, isLeftChild).

Binary Search Tree/Solution 1/BinarySearchTree.playground/Sources · high confidence

Updated Binary Search Tree playground to Swift 4.2

The Binary Search Tree solution has been updated to Swift 4.2, ensuring compatibility with the latest Swift language features and tooling. This update allows users to explore the implementation using modern Swift syntax and playground capabilities.

Binary Search Tree/Solution 1/BinarySearchTree.playground, Breadth-First Search/BreadthFirstSearch.playground · medium confidence

Updated Dining Philosophers project to Swift 4.2

The Xcode project configuration for the Dining Philosophers example has been updated to use Swift 4.2, ensuring compatibility with modern Swift toolchains and Xcode versions.

DiningPhilosophers/DiningPhilosophers.xcodeproj · high confidence

Updated Graph project configuration for Swift 4.2

The Graph project's Xcode project file (project.pbxproj) has been updated to reflect Swift 4.2 compatibility, including updated build settings and target configurations for both the Graph framework and its associated tests.

Graph/Graph.xcodeproj · high confidence

Updated Xcode scheme configurations for Graph and GraphTests

The Xcode project's shared scheme files (Graph.xcscheme and GraphTests.xcscheme) have been updated to version 1.3 with a last upgrade version of 1010. This change updates the build, test, launch, profile, analyze, and archive configurations for the Graph framework and its associated test bundle, ensuring compatibility with newer versions of Xcode and the Swift toolchain.

Graph/Graph.xcodeproj/xcshareddata · high confidence

Fixes

1 commit (1 fix) fixing Fixed Size Array/Images

A fix in Fixed Size Array/Images — 1 commit (1 fix), 7 files.

Fixed Size Array/Images · medium confidence · unverified

Test coverage

Added Xcode project configuration for B-Tree unit tests; Added Xcode project configuration for Bounded Priority Queue tests; Added Xcode scheme configuration for the Tests target; Added Xcode scheme for the Bounded Priority Queue tests; Added Xcode scheme for the K-Means test target; Added Xcode scheme for the Tests target; Added Xcode workspace configuration files for the Tests project; Added Xcode workspace configuration for the Bucket Sort tests; Added Xcode workspace file for the Tests project; Added Xcode workspace files for test projects; Added initial test suite for Convex Hull; Added test coverage for Graph edge retrieval; Added test suite for Breadth-First Search; Added tests for Depth-First Search; Added unit test project for Breadth-First Search; Added unit test suite for AVL Tree and TreeNode; Added unit test suite for Bucket Sort; Added unit tests for AVL Tree and TreeNode; Added unit tests for B-Tree and B-Node components; Added unit tests for Boyer-Moore and Boyer-Moore-Horspool string search algorithms; Added unit tests for Karatsuba multiplication; Added unit tests for the Bloom Filter implementation; Added unit tests for the Hashed Heap data structure; Added unit tests for the Insertion Sort algorithm; Added unit tests for the K-Means clustering algorithm; Added workspace configuration files for the Binary Search Tree tests project; Added workspace configuration for the test target; Configured shared test scheme for Xcode and xctool; Enable shared test scheme for CI integration; Updated Xcode workspace settings for the Bounded Priority Queue tests.

Dependencies

Added Swift Package Manager manifests for new algorithm examples

Added new Swift Package Manager (SwiftPM) configuration files (Package.swift) for the 'DiningPhilosophers' and 'MinimumCoinChange' algorithm examples. These changes introduce the project structure for these specific algorithms, allowing them to be built and managed as independent Swift packages.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 40 → 55 (+14.4)
  • Rubric changed (rubric-2026.08.15 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 100 → 96 (-3.9)
  • Architecture 98 (new)
  • Maturity 58 → 66 (+8.0)
  • Readiness 17 → 33 (+16.1)
  • Security 55 → 70 (+15.0)

Resolved (10)

  • Dimension evaluation failed
  • No automated tests
  • No exposed public API
  • No tests found
  • Secret: aws-access-token (Knuth-Morris-Pratt/KnuthMorrisPratt.playground/Contents.swift)
  • Secret: aws-access-token (Knuth-Morris-Pratt/KnuthMorrisPratt.playground/Contents.swift)
  • Secret: generic-api-key (Kth Largest Element/kthLargest.playground/playground.xcworkspace/xcshareddata/kthLargest.xcscmblueprint)
  • Secret: generic-api-key (Kth Largest Element/kthLargest.playground/playground.xcworkspace/xcshareddata/kthLargest.xcscmblueprint)
  • Test reliability not included
  • The welcome page links to 'What are algorithms and data structures?' and 'Why learn algorithms?', but no link is given for the algorithm-design techniques doc referenced in the outline. (README.markdown)

New (92)

  • Assertions commented out: testExample (Palindromes/Test/Test/Test.swift)
  • Assertions commented out: testExample (Trie/Trie/TrieUITests/TrieUITests.swift)
  • Coverage not measured — Swift suite
  • Dependency hygiene PARTLY measured — SwiftPM pinning read, dependency currency NOT established
  • Dormant codebase
  • Duplicated block (5 lines × 2) (Hashed Heap/HashedHeap.swift)
  • Graph.topologicalSortKahn (cognitive 16) (A-Star/AStar.swift)
  • Line2D.perpendicularLineAt (cognitive 16) (Points Lines Planes/Points Lines Planes/2D/Line2D.swift)
  • Low cohesion: AbstractGraph (LCOM4 5) (Graph/Graph/Graph.swift)
  • Low cohesion: String (LCOM4 4) (Boyer-Moore-Horspool/BoyerMooreHorspool.swift)
  • Most significant orphaned file (Red-Black Tree/RedBlackTree.swift)
  • MyersDifferenceAlgorithm.calculateShortestEditDistance (cognitive 17) (Myers Difference Algorithm/MyersDifferenceAlgorithm.swift)
  • No ADRs found
  • No assertions: testDeleteExistingOnly2Children (Splay Tree/Tests/SplayTreeTests.swift)
  • No assertions: testDeleteExistingOnlyLeftChild (Splay Tree/Tests/SplayTreeTests.swift)
  • No assertions: testDeleteRoot (Splay Tree/Tests/SplayTreeTests.swift)
  • No assertions: testHorizontalInitialLine (Convex Hull/Tests/Tests.swift)
  • No assertions: testInsertAgainPerformance (Trie/Trie/TrieTests/TrieTests.swift)
  • No assertions: testInsertion (Splay Tree/Tests/SplayTreeTests.swift)
  • No assertions: testInsertionRemovals (Splay Tree/Tests/SplayTreeTests.swift)
  • …and 72 more

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

kodecocodes/swift-algorithm-club was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 27 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 05c6d0bc5fa9484dd29eb324603b3452f4f44f39 — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-d00c643c3f66.