Skip to content

Commit b8d20e6

Browse files
committed
Adds links to written tutorials on raywenderlich.com
1 parent f85748e commit b8d20e6

File tree

13 files changed

+31
-0
lines changed

13 files changed

+31
-0
lines changed

Binary Search Tree/README.markdown

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Binary Search Tree (BST)
22

3+
> This topic has been tutorialized [here](https://www.raywenderlich.com/139821/swift-algorithm-club-swift-binary-search-tree-data-structure)
4+
5+
36
A binary search tree is a special kind of [binary tree](../Binary%20Tree/) (a tree in which each node has at most two children) that performs insertions and deletions such that the tree is always sorted.
47

58
For more information about a tree, [read this first](../Tree/).

Boyer-Moore-Horspool/README.markdown

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Boyer-Moore String Search
22

3+
> This topic has been tutorialized [here](https://www.raywenderlich.com/163964/swift-algorithm-club-booyer-moore-string-search-algorithm)
4+
5+
36
Goal: Write a string search algorithm in pure Swift without importing Foundation or using `NSString`'s `rangeOfString()` method.
47

58
In other words, we want to implement an `indexOf(pattern: String)` extension on `String` that returns the `String.Index` of the first occurrence of the search pattern, or `nil` if the pattern could not be found inside the string.

Breadth-First Search/README.markdown

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Breadth-First Search
22

3+
> This topic has been tutorialized [here](https://www.raywenderlich.com/155801/swift-algorithm-club-swift-breadth-first-search)
4+
5+
36
Breadth-first search (BFS) is an algorithm for traversing or searching [tree](../Tree/) or [graph](../Graph/) data structures. It starts at a source node and explores the immediate neighbor nodes first, before moving to the next level neighbors.
47

58
Breadth-first search can be used on both directed and undirected graphs.

Depth-First Search/README.markdown

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Depth-First Search
22

3+
> This topic has been tutorialized [here](https://www.raywenderlich.com/157949/swift-algorithm-club-depth-first-search)
4+
35
Depth-first search (DFS) is an algorithm for traversing or searching [tree](../Tree/) or [graph](../Graph/) data structures. It starts at a source node and explores as far as possible along each branch before backtracking.
46

57
Depth-first search can be used on both directed and undirected graphs.

Graph/README.markdown

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Graph
22

3+
> This topic has been tutorialized [here](https://www.raywenderlich.com/152046/swift-algorithm-club-graphs-adjacency-list)
4+
5+
36
A graph looks like the following picture:
47

58
![A graph](Images/Graph.png)

Heap/README.markdown

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Heap
22

3+
> This topic has been tutorialized [here](https://www.raywenderlich.com/160631/swift-algorithm-club-heap-and-priority-queue-data-structure)
4+
35
A heap is a [binary tree](../Binary%20Tree/) inside an array, so it does not use parent/child pointers. A heap is sorted based on the "heap property" that determines the order of the nodes in the tree.
46

57
Common uses for heap:

Linked List/README.markdown

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Linked List
22

3+
> This topic has been tutorialized [here](https://www.raywenderlich.com/144083/swift-algorithm-club-swift-linked-list-data-structure)
4+
35
A linked list is a sequence of data items, just like an array. But where an array allocates a big block of memory to store the objects, the elements in a linked list are totally separate objects in memory and are connected through links:
46

57
+--------+ +--------+ +--------+ +--------+

Merge Sort/README.markdown

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Merge Sort
22

3+
> This topic has been tutorialized [here](https://www.raywenderlich.com/154256/swift-algorithm-club-swift-merge-sort)
4+
35
Goal: Sort an array from low to high (or high to low)
46

57
Invented in 1945 by John von Neumann, merge-sort is an efficient algorithm with a best, worst, and average time complexity of **O(n log n)**.

Minimum Spanning Tree/README.markdown

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Minimum Spanning Tree (Weighted Graph)
22

3+
> This topic has been tutorialized [here](https://www.raywenderlich.com/169392/swift-algorithm-club-minimum-spanning-tree-with-prims-algorithm)
4+
35
A [minimum spanning tree](https://en.wikipedia.org/wiki/Minimum_spanning_tree) (MST) of a connected undirected weighted graph has a subset of the edges from the original graph that connects all the vertices together, without any cycles and with the minimum possible total edge weight. There can be more than one MSTs of a graph.
46

57
There are two popular algorithms to calculate MST of a graph - [Kruskal's algorithm](https://en.wikipedia.org/wiki/Kruskal's_algorithm) and [Prim's algorithm](https://en.wikipedia.org/wiki/Prim's_algorithm). Both algorithms have a total time complexity of `O(ElogE)` where `E` is the number of edges from the original graph.

Queue/README.markdown

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Queue
22

3+
> This topic has been tutorialized [here](https://www.raywenderlich.com/148141/swift-algorithm-club-swift-queue-data-structure)
4+
35
A queue is a list where you can only insert new items at the back and remove items from the front. This ensures that the first item you enqueue is also the first item you dequeue. First come, first serve!
46

57
Why would you need this? Well, in many algorithms you want to add objects to a temporary list and pull them off this list later. Often the order in which you add and remove these objects matters.

Stack/README.markdown

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Stack
22

3+
> This topic has been tutorialized [here](https://www.raywenderlich.com/149213/swift-algorithm-club-swift-stack-data-structure)
4+
35
A stack is like an array but with limited functionality. You can only *push* to add a new element to the top of the stack, *pop* to remove the element from the top, and *peek* at the top element without popping it off.
46

57
Why would you want to do this? Well, in many algorithms you want to add objects to a temporary list at some point and then pull them off this list again at a later time. Often the order in which you add and remove these objects matters.

Tree/README.markdown

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Trees
22

3+
> This topic has been tutorialized [here](https://www.raywenderlich.com/138190/swift-algorithm-club-swift-tree-data-structure)
4+
5+
36
A tree represents hierarchical relationships between objects. This is a tree:
47

58
![A tree](Images/Tree.png)

Trie/ReadMe.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Trie
22

3+
> This topic has been tutorialized [here](https://www.raywenderlich.com/139410/swift-algorithm-club-swift-trie-data-structure)
4+
35
## What is a Trie?
46

57
A `Trie`, (also known as a prefix tree, or radix tree in some other implementations) is a special type of tree used to store associative data structures. A `Trie` for a dictionary might look like this:

0 commit comments

Comments
 (0)