Skip to content

Latest commit

 

History

History
96 lines (56 loc) · 3.87 KB

README.md

File metadata and controls

96 lines (56 loc) · 3.87 KB

Algorithm-DataStructure 🚀

This repository contains a collection of various algorithms and data structures implemented in Python. The files are organized into different categories based on their functionalities.

Binary Search

binary_search.py: implementation of the binary search algorithm

check_word_validation_trie.py: implementation of checking if a given word is valid or not using a trie data structure

heap/priority_queue.py: implementation of a priority queue using a heap data structure

red_black_tree.py: implementation of a red-black tree data structure

Dynamic Programming

knapsack problem.py: implementation of the knapsack problem using dynamic programming

Graph Algorithms

graph_search_bfs.py: implementation of a breadth-first search algorithm for graphs

graph_search_dfs.py: implementation of a depth-first search algorithm for graphs

minimum_bridge_connection.py: implementation of finding the minimum bridge connections in a graph

shortest_path-dijkstra.py: implementation of Dijkstra's shortest path algorithm for graphs

Greedy Algorithms

minimum_operations.py: implementation of finding the minimum operations required to convert one string to another

train_schedule-no_waiting_time.py: implementation of a train scheduling algorithm without waiting time

Linked List

linked_list.py: implementation of a linked list data structure\

Maps and Hashing

hashmap_for_strings.py: implementation of a hash map data structure for strings

staircase_problem.py: implementation of finding the number of ways to climb a staircase with a given number of steps

Queue

queue_by_array.py: implementation of a queue data structure using an array

queue_by_dynamic_list.py: implementation of a queue data structure using a dynamic list

queue_by_linkedlist.py: implementation of a queue data structure using a linked list

queue_by_stack.py: implementation of a queue data structure using two stacks

queue_reversed.py: implementation of a queue data structure with reversed order

Sorting Algorithms

sorting.py: implementation of various sorting algorithms

Stack

stack_from_array.py: implementation of a stack data structure using an array

stack_from_linkedlist.py: implementation of a stack data structure using a linked list

stack_from_listpy3.py: implementation of a stack data structure using a list

stack_parenthese.py: implementation of a parentheses balancing algorithm using a stack

stack_postfix_operation.py: implementation of postfix expression evaluation using a stack

stack_reverse.py: implementation of reversing a string using a stack

Installation

To run the scripts in this repository, you need to have Python 3 installed on your system. If you don't have it installed, you can download it from the official Python website here.

Usage

Each file in the repository represents a different algorithm or data structure. To run a specific algorithm, you can navigate to the relevant directory and run the corresponding file.

For example, if you want to run the binary search algorithm, you can navigate to Algorithm-DataStructure/basic algorithms/binary search/ directory and run the binary_search.py file using the following command:

python binary_search.py

You can modify the input data in the files as per your requirements.

Contribution

Contributions to this repository are welcome. If you want to contribute to the repository, please follow these steps:

  1. Fork this repository to your own account.
  2. Create a new branch with a descriptive name for your feature or bug fix.
  3. Make changes to the code and commit them with descriptive commit messages.
  4. Push your changes to your forked repository.
  5. Create a pull request from your branch to the main branch of this repository.
  6. Wait for your pull request to be reviewed and merged.

License

This repository is licensed under the MIT License..