Code Monkey home page Code Monkey logo

python-ds's Introduction

Python Data Structures and Algorithms

No non-sense solutions to common Data Structure and Algorithm interview questions in Python. Follows a consistent approach throughout problems.

Objective

There are a plenty of resources when it comes to interview preparations on the internet. What prompted me to create this project was the dissimilarity across different approaches and the infused complexity of the code.

Feel free to contribute but please follow the Contributing Guidelines as I want to maintain the uniformity of the implementation of data structures and algorithms. Last time around, people bombarded with me with Pull Requests, Issues and Emails insisting me to merge their changes

The open source community has helped me a lot during my interview preparations and studies while I was in my undergrad. I always wanted to give something back to the community. In my endeavour to contribute something back, I will be uploading data structures and algorithms questions in Python in this repo. Feel free to contribute and get in touch!

Structure of the repository

As of now, the repository contains 3 main directories: Bookmarks, Data Structures and Algorithms.

Data Structures

Contains all data structure questions categorised into sub-directories like stack, queue, etc according to their type.

  1. Array
  2. Dictionary
  3. Binary Search Tree
  4. Linked List
  5. Stack
  6. Graphs
  7. Circular Linked List
  8. Doubly Linked List

Algorithms

This directory contains various types of algorithm questions like Dynamic Programming, Sorting, Greedy, etc. The current structure of this directory is as follows:

  1. Dynamic Programming
  2. Graphs
  3. Greedy
  4. Math
  5. Misc
  6. Sorting
  7. Bit Manipulation

Bookmarks

You can find useful links in this repository in the different markdown files. Below is a table of contents.

Category Link
Articles Click Here
Books Click Here
Topics Click Here
Tutorials Click Here
Videos Click Here
Misc. Click Here

Things need to be done

As you can see, the repo is still in its infancy. Here are some key things in the to-do.

  1. Queue questions
  2. Algorithms
  3. More questions in data structures, especially for graph, circular linked list, trees, heaps and hash.

Contributing

Contributions are always welcomed. Feel free to raise new issues, file new PRs. Consider giving it a star and fork this repo!

To follow the guidelines, refer to Contributing.md

License

MIT License

python-ds's People

Contributors

anilkumarteegala avatar beqakd avatar biahawk avatar cclauss avatar cheymonty avatar durid17 avatar edh-oss avatar hacky1997 avatar imehar avatar jaywelborn avatar kakarot-2000 avatar maurocoppola avatar northtree avatar oishika-pradhan avatar pablomiralles22 avatar pooja795 avatar prabhupant avatar pratikscfr avatar sainimohit23 avatar shardul08 avatar shotanozadze avatar shreyas1599 avatar srbhr avatar suprit98 avatar targgus avatar thanasismpalatsoukas avatar tsaideepak7 avatar uday032 avatar vernalhav avatar vieiraroger avatar

Stargazers

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

Watchers

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

python-ds's Issues

Improve Readme

The one thing I think will help this project is a readme with a comprehensive index of the questions present in this repo (or even a separate file for index will do great).

Some areas where we could work -

  1. Add a logo
  2. Improve the language
  3. Usage instructions
  4. Make readme more comprehensive and friendly

Feel free to suggest any ideas or suggestions and file a PR ๐Ÿ˜ƒ

Changes in useful_links.md

To ease navigation and support more content, let's break down the useful_links.md into sub-files like articles.md, videos.md etc

Egg Dropping

A dynamic programming problem on an egg dropping puzzle.

Find if a string is interleaved of two other strings

Given three strings A, B and C. Write a function that checks whether C is an interleaving of A and B. C is said to be interleaving A and B, if it contains all characters of A and B and order of all characters in individual strings is preserved.

Create mkdocs or readthedocs explaining all data structures

This is a big goal and will definitely take months. But if we want this repository to be a single source for interview prep and studying about data structures and algorithms, then having a comprehensive doc about each data structure with its theory like time complexities and use cases will definitely be a great thing.

I will start working on this in order to give it some direction and momentum.

Please feel free to suggest any improvements, open issues, point my short comings or contribute ๐Ÿ˜ƒ

Adding searching algorithms

I would like to contribute to this repository by making searching algorithms for python in the ### algorithm subfolder ( My first contribution ).

redundant graphs section

There are two graph sections - one in data structures and one in algorithms. Can I merge them into one single section under data structures? Or was this somehow intentional?

Create an index.md file for every sub-directory

Having an index for every sub-directory will ease navigation around the repository. Here is the structure I think will do good

- Data Structures
   - array
      - index.md
   - stack
      - index.md

and so on.

Please feel free to suggest improvements anywhere you feel like and contribute ๐Ÿ˜ƒ

Use of built in functions names as variables

I saw that in files:

data_structures/array/all_numbers_divisible.py
data_structures/array/max_consecutive_ones.py
data_structures/bst/check_if_bt_if_bst.py

There is a use of the words min and max as variables.
min and max are builtin functions of python and should not be used as variables.

Add new questions

Feel free to file a new PR containing new data structures and algorithms questions in Python :)

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.