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.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
knapsack problem.py
: implementation of the knapsack problem using dynamic programming
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
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.py
: implementation of a linked list data structure\
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_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.py
: implementation of various sorting algorithms
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
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.
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.
Contributions to this repository are welcome. If you want to contribute to the repository, please follow these steps:
- Fork this repository to your own account.
- Create a new branch with a descriptive name for your feature or bug fix.
- Make changes to the code and commit them with descriptive commit messages.
- Push your changes to your forked repository.
- Create a pull request from your branch to the main branch of this repository.
- Wait for your pull request to be reviewed and merged.
This repository is licensed under the MIT License..