Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. iOS
  3. Algorithm

Algorithm

MITSwift3.1.1

A Swift library providing probability tools and advanced data structures for building intelligent iOS/macOS applications.

Visit WebsiteGitHubGitHub
826 stars83 forks0 contributors

What is Algorithm?

Algorithm is a Swift library that provides a collection of probability tools and advanced data structures for iOS and macOS development. It helps developers implement intelligent features by offering ready-to-use components for statistical analysis and efficient data management, such as RedBlackTrees, SortedSets, and probability calculations on collections.

Target Audience

iOS and macOS developers building applications that require complex data manipulation, statistical analysis, or custom algorithmic logic, particularly those needing performance-optimized data structures beyond Swift's standard library.

Value Proposition

Developers choose Algorithm for its unique combination of probability utilities and production-ready data structures in a single Swift package, reducing the need to implement these complex components from scratch while ensuring high performance and reliability.

Overview

Algorithm is a library of tools that is used to create intelligent applications.

Use Cases

Best For

  • Implementing probability-based features in games or simulations
  • Managing large, sorted datasets with efficient search and insertion
  • Building custom collections with order-statistic access
  • Adding statistical analysis capabilities to Swift apps
  • Educational projects teaching data structures and algorithms in Swift
  • Developing algorithms that require RedBlackTrees or balanced BSTs

Not Ideal For

  • Projects exclusively using SwiftUI that require seamless integration with modern declarative frameworks.
  • Applications where Swift's standard collections (Array, Dictionary, Set) are sufficient and adding a third-party library is unnecessary overhead.
  • Teams prioritizing libraries with active maintenance and frequent updates for the latest Swift versions and iOS features.

Pros & Cons

Pros

High-Performance Data Structures

Includes RedBlackTree and SortedSet with O(log n) operations for efficient insert, remove, and search, as highlighted in the philosophy section of the README.

Built-in Probability Tools

Provides methods like probability(of:) and expectedValue(trials:for:) on collections, with clear examples for die rolls and conditional probabilities in the README samples.

Order-Statistic Subscripting

Data structures such as RedBlackTree support index-based access, allowing array-like subscripting for sorted data, demonstrated in the README with examples like ages[1].

Easy Dependency Management

Supports installation via CocoaPods and Carthage, with detailed podfile and cartfile examples in the README, making integration straightforward for Xcode projects.

Cons

Outdated Platform Requirements

Requires iOS 8.0+ and Xcode 8.0+, which are several versions behind current standards, potentially causing compatibility issues with newer Swift features and limiting use in modern apps.

Limited Ecosystem and Support

Relies on Stack Overflow for help and has a Changelog that warns of changes, indicating reduced active development and community support compared to more popular Swift libraries.

No Modern Swift Integration

Lacks support for contemporary Swift paradigms like Codable, Combine, or SwiftUI, limiting its usefulness in modern app architectures that rely on these frameworks.

Frequently Asked Questions

Quick Stats

Stars826
Forks83
Contributors0
Open Issues3
Last commit6 years ago
CreatedSince 2016

Tags

#algorithm#ios#statistics#data-structures#red-black-tree#data-structure#probabilistic-programming#set#dictionary#swift-library#algorithms#probability#macos

Built With

X
Xcode
i
iOS
m
macOS
S
Swift

Links & Resources

Website

Included in

iOS51.7kSwift26.0k
Auto-fetched 4 hours ago

Related Projects

swift-algorithm-clubswift-algorithm-club

Algorithms and data structures in Swift, with explanations!

Stars29,106
Forks4,969
Last commit1 year ago
DollarDollar

A functional tool-belt for Swift Language similar to Lo-Dash or Underscore.js in Javascript

Stars4,248
Forks362
Last commit2 years ago
DifferenceKitDifferenceKit

💻 A fast and flexible O(n) difference algorithm framework for Swift collection.

Stars3,658
Forks242
Last commit2 years ago
ResultResult

Swift type modelling the success/failure of arbitrary operations.

Stars2,498
Forks228
Last commit5 years ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub