Skip to main content

This library contains useful data structures and algorithms that are commonly used in coding interviews.

Project description

pyinterview logo

PyPI version PyPI - Downloads Build Status Code Style pre-commit Contributor Covenant Documentation Status GitHub

Description

This library contains useful data structures and algorithms that are commonly used in coding interviews. The goal of this project is to provide modules that can actually be used to solve interviewing problems. This project is NOT a code dump of solutions to interviewing problems. The classes and functions were designed to be compatible with LeetCode.

Installation

The pyinterview package can be installed directly using pip.

pip install pyinterview

Usage

Users can import common data structures and algorithms from several different modules. For example:

  • To manually construct a binary tree, import the TreeNode class from the trees module:
from pyinterview.trees import TreeNode

root = TreeNode(2)
root.left = TreeNode(1)
root.right = TreeNode(3)
  • To construct a undirected graph adjacency list, import the undirected_adj_list function from the graphs module:
from pyinterview.graphs import undirected_adj_list

edges = [('A', 'B'), ('A', 'C'), ('C', 'D')]
adj_list = undirected_adj_list(edges)

Documentation

The documentation is a work in progress, but contributions are welcome!

pyinterview documentation

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyinterview-0.1.5.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

pyinterview-0.1.5-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file pyinterview-0.1.5.tar.gz.

File metadata

  • Download URL: pyinterview-0.1.5.tar.gz
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7

File hashes

Hashes for pyinterview-0.1.5.tar.gz
Algorithm Hash digest
SHA256 b44c41052226106315b139013186e5aed855b2f6554d97a24314566dca09701a
MD5 79c3b65e10f820f8708eabf53b0bca8e
BLAKE2b-256 a01d021612ffd376564eda8546205a316f306dea6718858e1e028e45d2957e23

See more details on using hashes here.

File details

Details for the file pyinterview-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: pyinterview-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 8.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7

File hashes

Hashes for pyinterview-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 107ca44eda619ceb397ca7e9c4a707383cd1d728c173b2fe508ddae850048a13
MD5 2bf8076ece33e07a42c3128eba16c351
BLAKE2b-256 d4911f99e12601540ebc71d23ee7faf75f4aeffb86c03434c631be6c6b1fbec5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page