Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #15

Open
wants to merge 1 commit into
base: development
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Algorithm is a library of tools that is used to create intelligent applications.

- If you **need help**, use [Stack Overflow](http://stackoverflow.com/questions/tagged/cosmicmind). (Tag 'cosmicmind')
- If you'd like to **ask a general question**, use [Stack Overflow](http://stackoverflow.com/questions/tagged/cosmicmind).
- If you **found a bug**, _and can provide steps to reliably reproduce it_, open an issue.
- If you **found a bug** _and can provide steps to reliably reproduce it_, open an issue.
- If you **have a feature request**, open an issue.
- If you **want to contribute**, submit a pull request.

Expand Down Expand Up @@ -68,7 +68,7 @@ $ pod install

## Carthage

Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.
Carthage is a decentralized dependency manager that builds dependencies and provides binary frameworks.

You can install Carthage with Homebrew using the following command:

Expand All @@ -86,7 +86,7 @@ Run `carthage update` to build the framework and drag the built `Algorithm.frame

## Changelog

Algorithm is a growing project and will encounter changes throughout its development. It is recommended that the [Changelog](https://github.com/CosmicMind/Algorithm/wiki/Changelog) be reviewed prior to updating versions.
Algorithm is a growing project and will encounter changes throughout its development. It is recommended that the [Changelog](https://github.com/CosmicMind/Algorithm/wiki/Changelog) is reviewed prior to updating versions.

# Samples

Expand Down Expand Up @@ -146,7 +146,7 @@ if 0.33 < pOfX {
<a name="expectedvalue"></a>
## Expected Value

The expected value of rolling a 3 or 6 with 100 trials using a die of 6 numbers.
The expected value of rolling a 3 or 6 with 100 trials using a die of 6 numbers is:

```swift
let die = [Int](arrayLiteral: 1, 2, 3, 4, 5, 6)
Expand Down Expand Up @@ -190,7 +190,7 @@ while nil != value {
<a name="stack"></a>
## Stack

The Stack data structure is a container of objects that are inserted and removed according to the last-in-first-out (LIFO) principle. Below is an example of its usage.
The Stack data structure is a container of objects inserted and removed according to the last-in-first-out (LIFO) principle. Below is an example of its usage.

```swift
var stack = Stack<Int>()
Expand All @@ -209,7 +209,7 @@ while !stack.isEmpty {
<a name="queue"></a>
## Queue

The Queue data structure is a container of objects that are inserted and removed according to the first-in-first-out (FIFO) principle. Below is an example of its usage.
The Queue data structure is a container of objects inserted and removed according to the first-in-first-out (FIFO) principle. Below is an example of its usage.

```swift
var queue = Queue<Int>()
Expand Down Expand Up @@ -257,7 +257,7 @@ while !dequeB.isEmpty {
<a name="redblacktree"></a>
## RedBlackTree

A RedBlackTree is a Balanced Binary Search Tree that maintains insert, remove, update, and search operations in a complexity of O(logn). The following implementation of a RedBlackTree also includes an order-statistic, which allows the data structure to be accessed using subscripts like an array or dictionary. RedBlackTrees may store unique keys or non-unique key values. Below is an example of its usage.
A RedBlackTree is a Balanced Binary Search Tree that maintains insert, remove, update, and search operations in a complexity of O(logn). The following implementation of a RedBlackTree also includes an order-statistic which allows the data structure to be accessed using subscripts like an array or dictionary. RedBlackTrees may store unique keys or non-unique key values. Below is an example of its usage.

```swift
var ages = RedBlackTree<String, Int>(uniqueKeys: true)
Expand All @@ -276,7 +276,7 @@ if "Peter" == node.key {
<a name="sortedset"></a>
## SortedSet

SortedSets are a powerful data structure for algorithm and analysis design. Elements within a SortedSet are unique and insert, remove, and search operations have a complexity of O(logn). The following implementation of a SortedSet also includes an order-statistic, which allows the data structure to be accessed using an index subscript like an array. Below are examples of its usage.
SortedSets are data structures for algorithms and analysis design. Elements within a SortedSet are unique. Insert, remove, and search operations have a complexity of O(logn). The following implementation of a SortedSet includes an order-statistic which allows the data structure to be accessed using an index subscript like an array. Below are examples of its usage.

```swift
let setA = SortedSet<Int>(elements: 1, 2, 3)
Expand Down Expand Up @@ -310,17 +310,17 @@ setE.probability(of: setA.first!, setA.last!)
<a name="sortedmultiset"></a>
## SortedMultiSet

A SortedMultiSet is identical to a SortedSet, except that a SortedMultiSet allows non-unique elements. Look at [SortedSet](#sortedset) for examples of its usage.
A SortedMultiSet is a SortedSet that allows non-unique elements. Look at [SortedSet](#sortedset) for examples of its usage.

<a name="sorteddictionary"></a>
## SortedDictionary

A SortedDictionary is a powerful data structure that maintains a sorted set of keys with value pairs. Keys within a SortedDictionary are unique and insert, remove, update, and search operations have a complexity of O(logn).
A SortedDictionary is a data structure that maintains a sorted set of keys with value pairs. Keys within a SortedDictionary are unique and insert, remove, update, and search operations have a complexity of O(logn).

<a name="sortedmultidictionary"></a>
## SortedMultiDictionary

A SortedMultiDictionary is identical to a SortedDictionary, except that a SortedMultiDictionary allows non-unique keys. Below is an example of its usage.
A SortedMultiDictionary is a SortedDictionary that allows non-unique keys. Below is an example of its usage.

```swift
struct Student {
Expand Down