Skip to main content

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

Metadata

Release files for pyinterview 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyinterview 0.1.5
File Size Uploaded
pyinterview-0.1.5.tar.gz 8.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyinterview 0.1.5
File Interpreter ABI Platform
pyinterview-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 16.6 kB

Release files / pyinterview-0.1.5.tar.gz

Download URL pyinterview-0.1.5.tar.gz
Size 8.0 kB
Tags Source
SHA-256 checksum
How to use checksums
b44c41052226106315b139013186e5aed855b2f6554d97a24314566dca09701a
BLAKE2b-256 checksum
How to use checksums
a01d021612ffd376564eda8546205a316f306dea6718858e1e028e45d2957e23
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / pyinterview-0.1.5-py3-none-any.whl

Download URL pyinterview-0.1.5-py3-none-any.whl
Size 8.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
107ca44eda619ceb397ca7e9c4a707383cd1d728c173b2fe508ddae850048a13
BLAKE2b-256 checksum
How to use checksums
d4911f99e12601540ebc71d23ee7faf75f4aeffb86c03434c631be6c6b1fbec5
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page