Changelog History
-
v4.1 Changes
January 09, 2018This is a quick note announcing an updated version of the Swift Algorithms Book. For those whoโve previously purchased the PDF version , all reference materials (including further reading) are now hyperlinked. Chapter headings are also clickable to specific sections in the document. Changes to both the EPUB and PDF versions include the following:
๐ Revised LinkList.remove(at:) algorithm
๐ Renamed methods for HashTable algorithm and Keyable Protocol
Revised content for Stacks & Queues
Revised content for Basic Sorting -
v4.0 Changes
September 25, 2017Swift 4.0 is now officially released! As a result, The Swift Algorithms project has been updated to reflect this new standard.
๐ Change Summary
The relative stability of Swift 4.0 has allowed an opportunity refine many areas of the code base. Notable updates include:
- ๐ New examples of code Memoization and Dynamic Programming
- ๐ New non-recursive Binary Search Tree Algorithm (BST)
- ๐ New
contains()
method for BST's. - ๐ New generic
min/max
Heap Algorithm - ๐ New unit test cases for evaluating Fibonacci and Heap Algorithms
subscript
syntax applied toTrie
andLinked List
algorithms- ๐ Support for new Swift-based
Array.swapAt
function - Limited use of Implicit Unwrapped Optionals (IUO's)
Existing Swift 3.0 followers should study the new Swift 4.0 BST Algorithm. To simulate a
call stack
often employed in recursive processes, this model uses a customStack
data structure in conjunction withinout
variables.Follow the latest Swift 4.0 code updates from the master branch. If you have questions or would like submit a pull request, please do so using the develop branch.
-
v3.0-beta.6 Changes
August 31, 2016With the final version of Swift 3.0 soon to be announced, the algorithms project has been updated to reflect the latest standard!
๐ Change Summary
This update incorporates final language changes to Swift 3.0. These include minor functional changes to declare
inout
parameters, optionals, cast operations andinfix
operators.Branches
Follow the latest Swift 3.0 code updates here. While Swift 3.0 remains in beta, the master project branch will continue to support Swift 2.2.
-
v3.0-beta.3 Changes
July 27, 2016With Swift 3.0 now available in beta, the algorithms project has been updated to reflect this new standard!
๐ Change Summary
There have been many language refinements introduced with Swift 3.0. This has provided an opportunity to also refine numerous areas of the algorithms project. Notable Swift 3.0 proposals now supported include:
- ๐ New collection indexing model (SE-0065)
- ๐ Remove C-style for-loops with conditions (SE-0007)
- Consistent parameter naming (SE-0046)
- โ Warning for unused results (SE-0047)
- New implicit unwrapped optionals model (SE-0054)
- ๐ Better Translation of Objective-C APIs Into Swift (SE-005)
Existing Swift 2.2 followers should study the revamped Swift 3.0 collection indexing model. This implementation can seen with the refactored
String
extension and newSortable
protocol extension.โ Additional Refinements
๐ New
Int
andArray
extensions have been added to support pre-existingMath
andSorting
classes (respectively). Beyond centralizing specific operations, the new design now works directly with the recursiveEnum
project example. Finally, a general effort has been made to improve generics (where applicable). This includes refactoringHash Tables
(renamedHash Lists
) to support generic objects as well as theSearch
andSorting
algorithms.Branches
Follow the latest Swift 3.0 code updates here. While Swift 3.0 remains in beta, the master project branch will continue to support Swift 2.2.
-
v3.0-beta.2
July 15, 2016 -
v2.2 Changes
April 07, 2016โก๏ธ With Swift 2.2 now available, the algorithms project has been updated to reflect this new standard!
๐ Change Summary
๐ This release mainly addresses legacy C-style syntax. With the pending removal of C-style loops as well as increment / decrement markers in Swift 3.0, Github examples for
bubbleSort
,insertionSort
andselectionSort
have been refactored. Minor updates were also made toqueues
,stacks
andlinked lists
. While not officially published, the Math-basedfibonacci
methods were also updated to reflect non-mutating parameters. -
v2.1 Changes
December 02, 2015๐ With The Swift Algorithms Book now available in print, pdf and ePub formats, it's been great receiving feedback from people everywhere! One area of interest has been sorting and search. Beyond heaps, graphs and binary search trees (BST's), language newcomers have been curious to see how Swift handles traditional sorting algorithms like
bubbleSort()
andinsertionSort()
.๐ Change Summary
๐จ Github examples for
bubbleSort
,insertionSort
andselectionSort
now support generic and non-generic implementations using the latest Swift 2 syntax. Also, two new versions ofbinarySearch
are now available. To support these updates, SortingTest.swift has also been refactored to support generic and non-generic methods. -
v2.0 Changes
September 11, 2015โก๏ธ The introduction of Swift 2.0 brings a new level of usability and concise syntax many have come to appreciate. As the referring source for The Swift Algorithms Book, the Github source has been updated to meet this new standard.
๐ Change Summary
๐จ While most updates involved object mutability and basic syntax, significant refactoring was completed for the project
extensions
. Mainly used as helper functions fortrie
algorithms, readers should see little difference with the latest code and examples published in the book.๐ Along with code updates, this release also introduces a new algorithm called a
Bloom Filter
. Similar to a hash table, stay tuned for new documentation at waynewbishop.com that describes this process.