Skip to main content

leetcode precompiled package

Project description

LeetCode Python 预编译库

欢迎使用 LeetCode Python 工具库!

github

本库包含

  1. leetcode 官方声明的所有数据结构
  2. 本地测试所需的各种工具函数 api说明

安装

目前稳定版本为0.1.8。 可以通过以下命令安装该库:

bash

pip install precompiled  

pdm

pdm add precompiled

使用说明

安装完成后,您可以在 Python 代码中使用以下导入语句来访问leetcode所有数据结构:

python

复制

from precompiled.listnode import ListNode
from precompiled.nestedinteger import NestedInteger
from precompiled.treenode import TreeNode

常用数据结构和方法

  • ListNode:链表节点
    • 默认实现eq方法
    • array_to_list_node 将数组转换成链表,返回头结点
    • arrays_to_list_node 将多个数组转成多个链表,返回以链表为元素的元组
    • index: 返回链表第 idx 个节点, 下标从 0 开始。
  • NestedInteger:嵌套整数
  • TreeNode:树节点

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

precompiled-0.1.10.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

precompiled-0.1.10-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file precompiled-0.1.10.tar.gz.

File metadata

  • Download URL: precompiled-0.1.10.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: pdm/2.19.1 CPython/3.10.12 Linux/6.5.0-1025-azure

File hashes

Hashes for precompiled-0.1.10.tar.gz
Algorithm Hash digest
SHA256 d9ab3efd6c9725fc46abf4720889e186c103b9f8a3756f134ae3e270d3cea3d0
MD5 f0a49a152fefb7868f4acc07149ad2eb
BLAKE2b-256 90b34bd1bf51794170b50a66937b559e68237ad14e3a84467dbccceae0ca750c

See more details on using hashes here.

File details

Details for the file precompiled-0.1.10-py3-none-any.whl.

File metadata

  • Download URL: precompiled-0.1.10-py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: pdm/2.19.1 CPython/3.10.12 Linux/6.5.0-1025-azure

File hashes

Hashes for precompiled-0.1.10-py3-none-any.whl
Algorithm Hash digest
SHA256 9a6b9621ee9970e0d932b9e01fcb9a7b73f4debecc86e16e1661ae1171cac072
MD5 4ca753ceb080a5a024969d0ddeb14cc4
BLAKE2b-256 aee327c8d85abf8cce33dfb87de5f625262a1fc0818c1421fc6b84c0c2604399

See more details on using hashes here.

Supported by

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