Skip to main content

Python Leetcode utilities

Project description

pyleetcode-utils

Latest Version Build Status codecov Python Version wemake-python-styleguide license

Features

Currently, only LeetCode TreeNode implemented.

  • Converting [5, 3, 6, 2, 4, null, 7] -> TreeNode(5, TreeNode(3,...), TreeNode(6,...))

Installation

pip install pyleetcode-utils

Example

TreeNode usage:

from pyleetcode_utils import null
from pyleetcode_utils.datatypes import tree


class Solution:
  @tree.make_tree
  def findTarget(self, root: tree.TreeNode, k: int) -> bool:
    ...


Solution().findTarget([5, 3, 6, 2, 4, null, 7], 9)

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

pyleetcode_utils-0.1.3.tar.gz (3.4 kB view hashes)

Uploaded Source

Built Distribution

pyleetcode_utils-0.1.3-py3-none-any.whl (4.9 kB view hashes)

Uploaded Python 3

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