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.9.tar.gz (6.0 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.9-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: precompiled-0.1.9.tar.gz
  • Upload date:
  • Size: 6.0 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.9.tar.gz
Algorithm Hash digest
SHA256 c86aee36599b57bd3fa3a01bea419309b4439b0e6ed11072b25c617d974df47d
MD5 7fe8fcbfda96207f92c4f294f754beea
BLAKE2b-256 634ecb984f1796db7d9e1f087245efcbc37890b9cb3b49d2152fb5a08c95b11f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: precompiled-0.1.9-py3-none-any.whl
  • Upload date:
  • Size: 6.5 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.9-py3-none-any.whl
Algorithm Hash digest
SHA256 8f4a436c6721065e5caf4d9e9ed28497b8b5506771a152f60113aaa3d571dc2f
MD5 4acb97b78ee2c290570db121bd2a5e75
BLAKE2b-256 66907cd9e9a051f098b436218538e1d8cedd66c17eabffce47250d13d80ff7a4

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