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

https://github.com/thomasthaddeus/datastructuresalgorithms

Algorithms I wrote based on the requirements in the descriptions below
https://github.com/thomasthaddeus/datastructuresalgorithms

algorithms algorithms-and-data-structures python

Last synced: 3 months ago
JSON representation

Algorithms I wrote based on the requirements in the descriptions below

Awesome Lists containing this project

README

        

# Algorithms 📊

List of Algorithms and Examples

## 🐍[Week 1][W1]: Python Fundamentals

This task for this assignment is to practice Python language (ex. class, method, Object-Oriented Programming concepts, and syntaxes) and implement _simple_ and _binary search_ forlooking up the phone number of a given name.

## 📒[Week 2][W2]: Linked List & Selection Sort

The purpose of this assignment is to gain knowledge on the data structures: **Linked List** and **Selection Sort**. A shopping list will be implemented for this exercise. The program stores shopping items in both simple arrays or linked list. Each storing mechanism is separated into different files, such as `simple_array_shopping_list_manager.py` or `linked_list_shopping_list_manager.py`, where each file contains FileNameClass classes with essential methods for data manipulation.

## 🗼[Week 3][W3]: Stack & Recursive Functions

This assignment is to gain knowledge on **Stack** and **Recursive** functions. A shopping list using Stack will be implemented for this exercise. The program stores shopping items in both simple array or linked list-based Stack.

Each storing mechanism is separated into different files, such as `simple_array_shopping_list_manager.py` or `linked_list_shopping_list_manager.py`, where each file contains `FileNameClass` classes with essential methods for data manipulation.

## :octocat:[Week 4][W4]: Quicksort

This assignment is to gain knowledge on quicksort using a linked list. A shopping list will be reimplemented for this exercise. The program stores shopping items in both simple arrays and linked lists utilizing different methods for either. Each storing mechanism is separated into different files, such as `simple_array_shopping_list_manager.py` or `linked_list_shopping_list_manager.py`, where each file contains FileNameClass classes with essential methods for data manipulation.

## 🧮[Week 5][W5]: Hash Tables using Simple Array

This assignment is to gain knowledge on hash tables using a simple array along with a linked list. A grocery store inventory manager will be implemented for this exercise. The program stores inventory items in hash tables. Each storing mechanism is separated into different files, such as [simple_array_grocery_store_inventory.py][simp] or [`hash_grocery_store_inventory.py`][hash], where each file contains FileNameClass classes with essential methods for data manipulation.

## 🍞 [Week 6][W6]: Breadth-First Search

This assignment is to gain knowledge on the Breadth-first search using a queue. Given a 2D grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically. You may assume all four edges of the grid are all surrounded by water.

## 🤓💻 [Week 7][W7]: Dijkstras Algorithm

This assignment is to learn about the Dijkstra algorithm. Given a hash graph map from the dijkstra_main.py, complete the functions in the separate "DijkstraClass" class within dijkstra.py. The main object of the "DijkstraClass" is to find the lowest-cost path from the start (s) to finish (f).

## 🏴‍☠️ [Week 8][W8]: Treasure Hunter Class

Given a hunters and treasures locations from the `treasure_hunter_main.py`, complete the functions in the separate `TreasureHunterClass` class within `treasure_hunter.py`.
The main object of the `TreasureHunterClass` is to find the maximum treasures with given hunters.

A `treasure` + `hunter` map `array` of size `n` is constructed with the following specifications:

1. Each element in the array contains either a `hunter(H)` or a `treasure(T)`.
2. Each hunter can find only one treasure.
3. A hunter cannot catch a treasure that is more than `K` units away from the hunter.

## 🧮 [Week 9][W9]: Dynamic Programming

Given two string sequences from the longest_common_subseq_main.py, complete the functions in the separate LCSClass class within `longest_common_subseq.py`. The main object of the LCSClass is to find the length of the longest common subsequence.

## 🧔[Week 10][W10]: k-nn

The objective of this assignment is to learn about k-nearest neighbors. Given two data sets, complete the functions in the separate knnWrapperClass class within `knn_wrapper.py`, and edit the parameter on the train method call from the main method to achieve 100% accuracy. The knnWrapperClass object is to implement a k-nearest classifier wrapper and classify test data. In addition, you should use the pandas and KNeighborsClassifier library from sklearn, and you need to achieve a 100% classification rate on test data.

As part of the assignment, provide which 'neighbor' parameter works best for each dataset and describe tips on choosing the 'neighbor' value. Keep in mind to always comment and document your class and methods.

[W1]: /docs/PE01-README.md "Python Fundamentals"
[W2]: /docs/PE02-README.md "Requirements for simple array and linked list"
[W3]: /docs/PE03-README.md "Stack & Recursive Functions"
[W4]: /docs/PE04-README.md "Quicksort"
[W5]: /docs/PE05-README.md "Hash Tables using Simple Array"
[W6]: /docs/PE06-README.md "Breadth-First Search"
[W7]: /docs/PE07-README.md "Dijkstras Algorithm"
[W8]: /docs/PE08-README.md "Treasure Hunt Program"
[W9]: /docs/PE09-README.md "Dynamic Programming"
[W10]: /docs/PE10-README.md "K-NN classifier"
[simp]: /assets/modules/PE05/src/simp_arr_gsi.py "Links to the simple array shooping list manager"
[hash]: /assets/modules/PE05/src/hash_gsi.py "Links to the implementation of the hash function implemented in grocery store inventory"
[gsi]: /assets/modules/PE05/grocery_store_inventory.py