An open API service indexing awesome lists of open source software.

https://github.com/ramonfsk/data-structures-and-algorithms-swift

This repository contains my implementations and studies of various data structures and algorithms using Swift, organized in Xcode Playgrounds.
https://github.com/ramonfsk/data-structures-and-algorithms-swift

data-structures-and-algorithms self-study swift

Last synced: 3 months ago
JSON representation

This repository contains my implementations and studies of various data structures and algorithms using Swift, organized in Xcode Playgrounds.

Awesome Lists containing this project

README

          

# DSA in Swift

Welcome to my Data Structures and Algorithms (DSA) studies repository! This repository contains my implementations and studies of various data structures and algorithms using Swift, organized in Xcode Playgrounds.

## Table of Contents

- [DSA in Swift](#dsa-in-swift)
- [Table of Contents](#table-of-contents)
- [About](#about)
- [Data Structures](#data-structures)
- [Algorithms](#algorithms)
- [Examples](#examples)
- [Contributing](#contributing)
- [Contact](#contact)

## About

This repository is a collection of my implementations and experiments with various data structures and algorithms in Swift. It is organized using Xcode Playgrounds, making it interactive and easy to test and modify.

## Data Structures

The following data structures are implemented in this repository:

- Arrays
- Linked Lists
- Stacks
- Queues
- Trees
- Graphs
- Hash Tables
- Heaps

## Algorithms

The following algorithms are implemented in this repository:

Sorting Algorithms
- Bubble Sort
- Insertion Sort
- Selection Sort
- Merge Sort
- Quick Sort

Searching Algorithms
- Linear Search
- Binary Search
- Graph Algorithms:
- Depth-First Search (DFS)
- Breadth-First Search (BFS)

Dynamic Programming
- Fibonacci Sequence
- Longest Common Subsequence
- Other Algorithms:
- Dijkstra's Shortest Path
- Knuth-Morris-Pratt (KMP) String Matching

## Examples

Here are some example usages of the data structures and algorithms:

```swift
// Example of Binary Search
let array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
if let index = binarySearch(array, target: 5) {
print("Element found at index \(index)")
} else {
print("Element not found")
}

// Example of Merge Sort
let unsortedArray = [3, 6, 1, 8, 4, 5]
let sortedArray = mergeSort(unsortedArray)
print("Sorted Array: \(sortedArray)")
```

## Contributing

Contributions are welcome! If you have any improvements, bug fixes, or new algorithms and data structures to add, feel free to open a pull request.

1. Fork the repository
2. Create a new branch (git checkout -b feature-branch)
3. Commit your changes (git commit -am 'Add some feature')
4. Push to the branch (git push origin feature-branch)
5. Open a Pull Request

## Contact

If you have any questions or suggestions, feel free to contact me:

- Email: ramonfsk@gmail.com
- GitHub: ramonfsk

Thank you for visiting my DSA studies repository!