Skip to content

thomasthaddeus/DataStructuresAlgorithms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Algorithms 📊

List of Algorithms and Examples

🐍Week 1: 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: 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: 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: 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: 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 or hash_grocery_store_inventory.py, where each file contains FileNameClass classes with essential methods for data manipulation.

🍞 Week 6: 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: 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: 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: 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: 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.

About

Algorithms I wrote based on the requirements in the descriptions below

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published