Code Monkey home page Code Monkey logo

himanshu-03 / python-data-structures Goto Github PK

View Code? Open in Web Editor NEW
15.0 2.0 30.0 165 KB

A compilation of Data Structures in Python. It is a collection of Python code examples and implementations of various data structures. This repository aims to provide a comprehensive resource for understanding and utilizing different data structures efficiently in Python.

License: MIT License

Python 100.00%
data-structures dsa dsa-algorithm python hacktoberfest

python-data-structures's Introduction

Python Data Structures

Here' an amazing repo regarding data structure using python. This is a compilation of python codes examples and implementations of various concepts of data structure. It comprises of various resources for efficient understanding and utilizion of data structure in python.

Mandatory ‼️

  1. You need to create an issue first and wait till you are assigned the issue before creating a Pull Request.
  2. Give a proper description about your proposed and implemented changes in your issues and pull requests.

Contributing Guidelines

You can find our Contributing Guidelines here.

Getting started 🤟

  1. Fork this repo (button on top).

  2. Clone on your local machine.

    git clone https://github.com/himanshu-03/Python-Data-Structures.git
    
  3. Navigate to the project directory.

    cd Python-Data-Structures
    
  4. Create a new branch

    git checkout -b <branch-name>
    
  5. Adding New Data Strcture

    • Create a folder named by the Data Structure
    • Create .py file for a particular algorithm or code

    If data structure folder already exists in the repo, kindly add your code in the respective folder.

  6. Add all the changes that you have made

    git add .
    
  7. Commit your changes

    git commit -m "{Message}"
    
  8. Then push

    git push -u origin <branch-name>
    
  9. Submit a pull request 😎

🪪 License

This project follows the MIT LICENSE.

Contributors ✨


Connect with me

Github     LinkedIn     Twitter     Instagram     Gmail   

(Back to top)

python-data-structures's People

Contributors

aaryanale avatar adi271001 avatar aggarwal-tanushree avatar amad-ahmed avatar anshul-2010 avatar ashishk1331 avatar astha369 avatar avdhesh-varshney avatar conradkash avatar docjon09 avatar himanshu-03 avatar kallind avatar khushi-gupta13 avatar kirti36 avatar kushchoudhary98 avatar mahitej28 avatar pankajsingh92533 avatar payallenka avatar prateekpr17 avatar prathameshtheurkar avatar radhey644 avatar s7917 avatar sbdkdlalit0112 avatar stanleyedward avatar surya-mu avatar swish78 avatar villain45 avatar ydvmudit07 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

python-data-structures's Issues

Add kruskal's algorithm

Describe the algorithm/code

I want to add the code for Kruskal's algorithm.
Kruskal's algorithm is a minimum spanning tree algorithm that finds the smallest set of edges that connects all vertices in a graph without forming cycles. Adding this to the "Graphs" folder.

Do you want to work on this feature?

  • I am willing to implement this feature.

add: Bogo Sort

Describe the algorithm/code

Issue Description : Bogo Sort, sometimes humorously referred to as "Permutation Sort," is a highly inefficient and random sorting algorithm. It operates by randomly shuffling the elements of a list and checking if the list is sorted. If not, it continues to shuffle the elements randomly and recheck. Bogo Sort has no guaranteed time complexity and can take an impractically long time to sort even small lists. It is primarily used as an illustrative example of a deliberately inefficient algorithm and is not suitable for real-world sorting tasks.

Hi there 👋

I'm excited to contribute to Hacktoberfest 2023, and I'd like to work on this issue. It looks like a great opportunity to learn and contribute to the project.

Please assign this issue to me, and I'll start working on it right away. If you have any specific instructions or guidelines, please let me know, and I'll make sure to follow them.

Thanks a lot for considering my request!

Best regards,
Prateek Sethi

Do you want to work on this feature?

  • I am willing to implement this feature.

add: Prims algorithm for graph

Describe the algorithm/code

hey there, i wanted to add prims algorithm for graph.
I will give proper inputs and outputs and installation guide.
pls assign me this under hacktoberfest. :)

Do you want to work on this feature?

  • I am willing to implement this feature.

Enhancement of the Reacdme.md file

Describe the addition

I wish to enhance the Readme.md file of yours. I suppose I can make it better.

Do you want to work on this feature?

  • I am willing to implement this feature.

add: Selection Sort

Describe the algorithm/code

Project Description: Selection Sort is a simple sorting algorithm that repeatedly finds the minimum (or maximum) element from the unsorted portion of the list and moves it to the beginning of the sorted portion. It continues this process until the entire list is sorted.

Hi there 👋

I'm excited to contribute to Hacktoberfest 2023, and I'd like to work on this issue. It looks like a great opportunity to learn and contribute to the project.

Please assign this issue to me, and I'll start working on it right away. If you have any specific instructions or guidelines, please let me know, and I'll make sure to follow them.

Thanks a lot for considering my request!

Best regards,
Prateek Sethi

Do you want to work on this feature?

  • I am willing to implement this feature.

add: Gaussian Mixture Model

Describe the algorithm/code

Gaussian Mixture Model is another clustering algorithm and it is more accurate than k means algorithm please assign this to me under the hacktoberfest tag

Do you want to work on this feature?

  • I am willing to implement this feature.

add: WaveSort

Describe the algorithm/code

I would like to add wave sort code to your repo.

Do you want to work on this feature?

  • I am willing to implement this feature.

Dynamic Programming (DP)

Describe the algorithm/code

i want to add dynamic programming questions .Please assign me this under Hacktoberfest 2023 tag.

Do you want to work on this feature?

  • I am willing to implement this feature.

Trie Data Structure

Describe the algorithm/code

A trie, also known as a prefix tree, is a tree-like data structure that is used to store a dynamic set of strings. It is particularly efficient for tasks like searching for strings with a common prefix. Each node in a trie represents a character in a string.

@himanshu-03 Could you please assign me this under hacktoferbest2023

Do you want to work on this feature?

  • I am willing to implement this feature.

add: Quick Sort Algorithm

Describe the algorithm/code

Project Description: Quick Sort is a popular sorting algorithm that works by selecting a 'pivot' element from an array and partitioning the other elements into two sub-arrays, according to whether they are less than or greater than the pivot. It then recursively sorts the sub-arrays. This process continues until the entire array is sorted. Quick Sort is efficient and widely used for its average-case performance.

Hi there 👋

I'm excited to contribute to Hacktoberfest 2023, and I'd like to work on this issue. It looks like a great opportunity to learn and contribute to the project.

Please assign this issue to me, and I'll start working on it right away. If you have any specific instructions or guidelines, please let me know, and I'll make sure to follow them.

Thanks a lot for considering my request!

Best regards,
Prateek Sethi

Do you want to work on this feature?

  • I am willing to implement this feature.

add: Merge Sort Algorithm

Describe the algorithm/code

Merge sort is a highly efficient and stable sorting algorithm that follows the divide-and-conquer approach. It works by repeatedly dividing an unsorted list into two halves until individual elements are isolated, sorts them, and then merges them back together to form a fully sorted list.

Do you want to work on this feature?

  • I am willing to implement this feature.

add: new directory `Math`

Describe the algorithm/code

This 'Math' directory will contain all the python implementation of mathematics functions.

I will also add some methods like: Bisection Method and Sieve of Eratosthenes.

Do you want to work on this feature?

  • I am willing to implement this feature.

Bucket Sorting Algorithm

Describe the algorithm/code

add: I want to add the algorithm for Bucket Sort Algorithm

Do you want to work on this feature?

  • I am willing to implement this feature.

add: gbfs and astar search algorithms

Describe the algorithm/code

python code for gbfs and astar search algorithms

Do you want to work on this feature?

  • I am willing to implement this feature.

ExponentialSearch:<python sorting algorithm>

Describe the algorithm/code

hi @himanshu-03
In the sorting algorithms , exponential search is very efficient technique with better space and time complexity,
so i want to contribute for this issue.

Do you want to work on this feature?

  • I am willing to implement this feature.

add: OPTICS algorithm

Describe the algorithm/code

OPTICS stands for Ordering Points to Identify the Clustering Structure. It's a density-based algorithm similar to DBSCAN, but it's better because it can find meaningful clusters in data that varies in density. It does this by ordering the data points so that the closest points are neighbors in the ordering. Please assign me this issue under hacktoberfest tag.

Do you want to work on this feature?

  • I am willing to implement this feature.

add: Pattern Searching Algorithm, Naive Pattern Searching

Describe the algorithm/code

Naive pattern searching is the simplest method among other pattern-searching algorithms. It checks for all characters of the main string to the pattern. This algorithm is helpful for smaller texts. It does not need any pre-processing phases.
I can find the substring by checking once for the string. It also does not occupy extra space to perform the operation.

The time complexity of Naive Pattern Search method is O(m*n). The m is the size of pattern and n is the size of the main string.

Do you want to work on this feature?

  • I am willing to implement this feature.

Heapsort

Describe the algorithm/code

Adding heapsort code in python

Do you want to work on this feature?

  • I am willing to implement this feature.

add: Mean-Shift clustering algorithm

Describe the algorithm/code

This is another algorithm that is particularly useful for handling images and computer vision processing. Mean-shift is similar to the BIRCH algorithm because it also finds clusters without an initial number of clusters being set. This is a hierarchical clustering algorithm, but the downside is that it doesn't scale well when working with large data sets.Please Assign me this issue with hacktoberfest tag.

Do you want to work on this feature?

  • I am willing to implement this feature.

Cycle Sort: <sorting algorithms>

Describe the algorithm/code

Wanted to add another sorting technique which is cycle sort, it is in-place algorithm which is usually used for small set of values

Do you want to work on this feature?

  • I am willing to implement this feature.

add: Depth-First Search (DFS)

Describe the algorithm/code

Issue Description : Depth-First Search (DFS) is a graph traversal algorithm that explores as deeply as possible along a branch before backtracking. It's used to visit all the nodes in a graph or tree, typically starting from a root node. DFS is often implemented using recursion or a stack data structure and is useful for tasks like finding connected components, topological sorting, and pathfinding.

Hi there 👋

I'm excited to contribute to Hacktoberfest 2023, and I'd like to work on this issue. It looks like a great opportunity to learn and contribute to the project.

Please assign this issue to me, and I'll start working on it right away. If you have any specific instructions or guidelines, please let me know, and I'll make sure to follow them.

Thanks a lot for considering my request!

Best regards,
Prateek Sethi

Do you want to work on this feature?

  • I am willing to implement this feature.

add: kmeans Algorithm

Describe the algorithm/code

Divide a dataset into k clusters, where each data point belongs to the cluster with the nearest mean.

Do you want to work on this feature?

  • I am willing to implement this feature.

add: Bellman-Ford Algorithm

Describe the algorithm/code

Issue Description : The Bellman-Ford Algorithm is a single-source, shortest-path algorithm used to find the shortest paths from a source node to all other nodes in a weighted graph, even when the graph contains negative edge weights. It works by iteratively relaxing the edges in the graph, ensuring that it can detect and handle negative weight cycles.

Hi there 👋

I'm excited to contribute to Hacktoberfest 2023, and I'd like to work on this issue. It looks like a great opportunity to learn and contribute to the project.

Please assign this issue to me, and I'll start working on it right away. If you have any specific instructions or guidelines, please let me know, and I'll make sure to follow them.

Thanks a lot for considering my request!

Best regards,
Prateek Sethi

Do you want to work on this feature?

  • I am willing to implement this feature.

add: Gnome Sort

Describe the algorithm/code

Issue Description : Gnome Sort, also known as "Stupid Sort," is a simple sorting algorithm that repeatedly swaps adjacent elements to move them to their correct positions. It's similar to Bubble Sort but has a more naive approach. Gnome Sort is not efficient for large datasets and is primarily used for educational purposes to illustrate basic sorting concepts rather than practical sorting applications.

Hi there 👋

I'm excited to contribute to Hacktoberfest 2023, and I'd like to work on this issue. It looks like a great opportunity to learn and contribute to the project.

Please assign this issue to me, and I'll start working on it right away. If you have any specific instructions or guidelines, please let me know, and I'll make sure to follow them.

Thanks a lot for considering my request!

Best regards,
Prateek Sethi

Do you want to work on this feature?

  • I am willing to implement this feature.

add: Affinity Propagation ALgorithm

Describe the algorithm/code

This clustering algorithm is completely different from the others in the way that it clusters data. Each data point communicates with all of the other data points to let each other know how similar they are and that starts to reveal the clusters in the data. You don't have to tell this algorithm how many clusters to expect in the initialization parameters. Please assign me this issue with hacktoberfest tag

Do you want to work on this feature?

  • I am willing to implement this feature.

add: Prim's Minimum Spanning Algorithm

Describe the algorithm/code

Prim’s algorithm is a Greedy algorithm. This algorithm always starts with a single node and moves through several adjacent nodes, in order to explore all of the connected edges along the way. There are many ways to implement this in Python, for example the Lazy Method, Heap Method, etc. I have implemented the Fibonnaci Heap method to optimize the algorithm as much as possible, and have also left user-input to customize the graph for various outputs. This algo helps us acquire a MST in a small working time, and a efficient code to implement graphs.

Do you want to work on this feature?

  • I am willing to implement this feature.

Bucket Sort

Describe the algorithm/code

This is the bucket sort program in python.

Do you want to work on this feature?

  • I am willing to implement this feature.

Duplicates in sorting algorithm files

This file is titled as sorting algorithms and contains only radix and merge sort:
image
While in codes/sorting techniques, we already have some of the sorting algorithms present:
image
How about, we make ONE single file for all the sorting algorithms, and find EVERYTHING in one place?

add: DFS code for graph

Describe the algorithm/code

please assign me this issue under the tag hacktoberfest :)

Do you want to work on this feature?

  • I am willing to implement this feature.

Binary Search code

Describe the algorithm/code

Hi @himanshu-03
I would like to add Binary Search code to your repo ,
can you please assign this to me ?

Do you want to work on this feature?

  • I am willing to implement this feature.

add: Shell Sort algorithm in sort

Describe the algorithm/code

This code will prompt the user to enter a list of numbers separated by spaces, then apply the shell sort algorithm to sort the list, and finally, display the sorted list.

Do you want to work on this feature?

  • I am willing to implement this feature.

add: adding binary search tree data structure

Describe the algorithm/code

I will be adding adding binary search tree data structure and performing basic operations like insertion and traversal

Do you want to work on this feature?

  • I am willing to implement this feature.

add: DB SCAN Algorithm

Describe the algorithm/code

DBSCAN stands for density-based spatial clustering of applications with noise. It's a density-based clustering algorithm, unlike k-means.This is a good algorithm for finding outliners in a data set. It finds arbitrarily shaped clusters based on the density of data points in different regions. It separates regions by areas of low-density so that it can detect outliers between the high-density clusters. Please assign this to me under hacktoberfest tag

Do you want to work on this feature?

  • I am willing to implement this feature.

add: Ternary Search

Describe the algorithm/code

Issue Description : Ternary Search is a divide-and-conquer searching algorithm that splits the search range into three parts and determines which part the target value is likely to be in. It continues to narrow down the search range by comparing the target value with the values at two points within the range. Ternary Search is particularly useful when the data is ordered and evenly distributed and can be more efficient than binary search in such cases.

Hi there 👋

I'm excited to contribute to Hacktoberfest 2023, and I'd like to work on this issue. It looks like a great opportunity to learn and contribute to the project.

Please assign this issue to me, and I'll start working on it right away. If you have any specific instructions or guidelines, please let me know, and I'll make sure to follow them.

Thanks a lot for considering my request!

Best regards,
Prateek Sethi

Do you want to work on this feature?

  • I am willing to implement this feature.

Add traveling salesman algorithm

Describe the algorithm/code

The Traveling Salesman Problem (TSP) is a classic optimization challenge, where a salesperson seeks the shortest path to visit a set of cities once, returning to the starting point.
I wish to add the code to this algorithm in this repo.
Please assign me this issue.
Thanks.

Do you want to work on this feature?

  • I am willing to implement this feature.

add: Floyd-Warshall Algorithm

Describe the algorithm/code

Issue Description : The Floyd-Warshall Algorithm is a dynamic programming algorithm used to find the shortest paths between all pairs of nodes in a weighted graph. It works for directed or undirected graphs with positive or negative edge weights and is particularly valuable when you need to compute and store all shortest paths in a graph. The algorithm has a time and space complexity of O(n^3), making it suitable for small to moderately sized graphs.

Hi there 👋

I'm excited to contribute to Hacktoberfest 2023, and I'd like to work on this issue. It looks like a great opportunity to learn and contribute to the project.

Please assign this issue to me, and I'll start working on it right away. If you have any specific instructions or guidelines, please let me know, and I'll make sure to follow them.

Thanks a lot for considering my request!

Best regards,
Prateek Sethi

Do you want to work on this feature?

  • I am willing to implement this feature.

adding Radix Sort code

Describe the algorithm/code

This is the radix sort code written in Python.

Do you want to work on this feature?

  • I am willing to implement this feature.

add: Cocktail Shaker Sort

Describe the algorithm/code

Issue Description : Cocktail Shaker Sort, also known as Bidirectional Bubble Sort, is a variation of the Bubble Sort algorithm. It works by repeatedly sorting the list in both directions, from left to right and then from right to left, which reduces the number of passes required for sorting. Elements "bubble" up and down until the list becomes fully sorted.

Hi there 👋

I'm excited to contribute to Hacktoberfest 2023, and I'd like to work on this issue. It looks like a great opportunity to learn and contribute to the project.

Please assign this issue to me, and I'll start working on it right away. If you have any specific instructions or guidelines, please let me know, and I'll make sure to follow them.

Thanks a lot for considering my request!

Best regards,
Prateek Sethi

Do you want to work on this feature?

  • I am willing to implement this feature.

add: Counting Sort

Describe the algorithm/code

Project Description: Counting Sort is an integer sorting algorithm that works by counting the number of objects with distinct integer keys and using this information to determine their positions in the sorted output. It's efficient for sorting a range of non-negative integers and has a linear time complexity, making it faster than comparison-based sorting algorithms for specific use cases.

Hi there 👋

I'm excited to contribute to Hacktoberfest 2023, and I'd like to work on this issue. It looks like a great opportunity to learn and contribute to the project.

Please assign this issue to me, and I'll start working on it right away. If you have any specific instructions or guidelines, please let me know, and I'll make sure to follow them.

Thanks a lot for considering my request!

Best regards,
Prateek Sethi

Do you want to work on this feature?

  • I am willing to implement this feature.

add: Fibonacci Searching Algorithm

Describe the algorithm/code

I would like to contribute Fibonacci searching algorithm under hacktoberfest 2023.
please assign it to me.
/assign

Do you want to work on this feature?

  • I am willing to implement this feature.

[UPDATE] Readme File Modification

I would like to work on this repository by updating the readme file and adding contribution guidelines to it. Kindly assign me this issue under Hacktoberfest.

add: Shell Sort

Describe the algorithm/code

Project Description: Shell Sort is an efficient and in-place sorting algorithm that is an extension of the Insertion Sort. It breaks the original list into smaller sub-lists and sorts those sub-lists using Insertion Sort. As the algorithm progresses, the sub-lists become increasingly sorted, leading to a fully sorted list.

Hi there 👋

I'm excited to contribute to Hacktoberfest 2023, and I'd like to work on this issue. It looks like a great opportunity to learn and contribute to the project.

Please assign this issue to me, and I'll start working on it right away. If you have any specific instructions or guidelines, please let me know, and I'll make sure to follow them.

Thanks a lot for considering my request!

Best regards,
Prateek Sethi

Do you want to work on this feature?

  • I am willing to implement this feature.

Add Counting Sort

Describe the algorithm/code

I want to contribute to this repo by adding Counting Sort Algorithm code using python.

Do you want to work on this feature?

  • I am willing to implement this feature.

Addition of Linear Search

Describe the algorithm/code

I would like to add the linear search program.

Do you want to work on this feature?

  • I am willing to implement this feature.

add: BIRCH Algorithm

Describe the algorithm/code

BIRCH algorithm
The Balance Iterative Reducing and Clustering using Hierarchies (BIRCH) algorithm works better on large data sets than the k-means algorithm. It breaks the data into little summaries that are clustered instead of the original data points. The summaries hold as much distribution information about the data points as possible. please assign me this issue with hacktoberfest tag

Do you want to work on this feature?

  • I am willing to implement this feature.

add: Insertion Sort

Describe the algorithm/code

Project Description: Insertion Sort is a simple sorting algorithm that builds the final sorted array one element at a time. It takes each element and inserts it into its correct position within the sorted portion of the array.

Hi there 👋

I'm excited to contribute to Hacktoberfest 2023, and I'd like to work on this issue. It looks like a great opportunity to learn and contribute to the project.

Please assign this issue to me, and I'll start working on it right away. If you have any specific instructions or guidelines, please let me know, and I'll make sure to follow them.

Thanks a lot for considering my request!

Best regards,
Prateek Sethi

Do you want to work on this feature?

  • I am willing to implement this feature.

add: Dijkstra's Algorithm

Describe the algorithm/code

Issue Description : Dijkstra's Algorithm is a widely used graph algorithm designed to find the shortest path from a source node to all other nodes in a weighted graph. It was developed by Dutch computer scientist Edsger W. Dijkstra in 1956. The algorithm is particularly effective when all edge weights are non-negative.

Hi there 👋

I'm excited to contribute to Hacktoberfest 2023, and I'd like to work on this issue. It looks like a great opportunity to learn and contribute to the project.

Please assign this issue to me, and I'll start working on it right away. If you have any specific instructions or guidelines, please let me know, and I'll make sure to follow them.

Thanks a lot for considering my request!

Best regards,
Prateek Sethi

Do you want to work on this feature?

  • I am willing to implement this feature.

add: Breadth-First Search (BFS)

Describe the algorithm/code

Issue Description : Breadth-First Search (BFS) is a graph traversal algorithm that systematically explores all neighbors of a node before moving on to their neighbors. It starts at the root node and progresses level by level, making it useful for tasks like finding the shortest path in unweighted graphs, exploring the connectivity of a graph, and web crawling. BFS is typically implemented using a queue data structure.

Hi there 👋

I'm excited to contribute to Hacktoberfest 2023, and I'd like to work on this issue. It looks like a great opportunity to learn and contribute to the project.

Please assign this issue to me, and I'll start working on it right away. If you have any specific instructions or guidelines, please let me know, and I'll make sure to follow them.

Thanks a lot for considering my request!

Best regards,
Prateek Sethi

Do you want to work on this feature?

  • I am willing to implement this feature.

add: Jump Search

Describe the algorithm/code

Issue Description : Jump Search is an efficient searching algorithm for ordered lists. It divides the list into smaller blocks and jumps ahead by fixed steps to quickly reach a block that might contain the target value. It then performs a linear search within that block, providing a balance between the efficiency of binary search and the simplicity of linear search. Jump Search is especially useful for large datasets where binary search might be less efficient due to its logarithmic time complexity.

Hi there 👋

I'm excited to contribute to Hacktoberfest 2023, and I'd like to work on this issue. It looks like a great opportunity to learn and contribute to the project.

Please assign this issue to me, and I'll start working on it right away. If you have any specific instructions or guidelines, please let me know, and I'll make sure to follow them.

Thanks a lot for considering my request!

Best regards,
Prateek Sethi

Do you want to work on this feature?

  • I am willing to implement this feature.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.