Skip to main content

Linkify

Linkify is a Python library that converts arrays into linked lists. This library provides a simple way to create and manipulate linked lists using standard array data.

Installation

You can install the Linkify library using pip:

pip install Linkify-Linkedlist

Usage

  • Creating a Linked List from an Array
from Linkify import LinkedList

# Create a linked list from an array
arr = [1, 2, 3, 4, 5]
linked_list = LinkedList.from_array(arr)

# Display the linked list with arrows
print(linked_list.display())  # Output: 1 -> 2 -> 3 -> 4 -> 5
  • Appending Elements
from Linkify import LinkedList

# Create an empty linked list
linked_list = LinkedList()

# Append elements
linked_list.append(10)
linked_list.append(20)

# Display the linked list
print(linked_list.display())  # Output: 10 -> 20
  • Use Case

Imagine you are developing a task management system where tasks are frequently added and removed. Using a linked list for storing these tasks can be more efficient compared to arrays, especially for operations that involve frequent insertions and deletions.

from Linkify import LinkedList

# Initial list of tasks
tasks = ['Task 1', 'Task 2', 'Task 3']

# Convert the list of tasks to a linked list
task_list = LinkedList.from_array(tasks)

# Add a new task
task_list.append('Task 4')

# Display the updated task list
print(task_list.display())  # Output: Task 1 -> Task 2 -> Task 3 -> Task 4

# Suppose Task 1 is completed, you can remove it from the list (implementation needed)
# task_list.remove('Task 1')  # Assume you have implemented a remove method

# Display the list after removal
print(task_list.display())  # Output might be: Task 2 -> Task 3 -> Task 4

License

This project is licensed under the MIT License - see the LICENSE file for details.

Metadata

Release files for Linkify-Linkedlist 0.1.2

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

Source distribution (sdist)

Source distribution for Linkify-Linkedlist 0.1.2
File Size Uploaded
linkify_linkedlist-0.1.2.tar.gz 3.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for Linkify-Linkedlist 0.1.2
File Interpreter ABI Platform
Linkify_Linkedlist-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 7.5 kB

Release files / linkify_linkedlist-0.1.2.tar.gz

Download URL linkify_linkedlist-0.1.2.tar.gz
Size 3.4 kB
Tags Source
SHA-256 checksum
How to use checksums
e5d7f7389b2393e6f74450822c80cb7ee399303cc809c7df8d159d1beb7523b7
BLAKE2b-256 checksum
How to use checksums
88c38f4b7ef984fb5a852181873bcff492363366c4d4f6ce3b2356c641abe46f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.9

Release files / Linkify_Linkedlist-0.1.2-py3-none-any.whl

Download URL Linkify_Linkedlist-0.1.2-py3-none-any.whl
Size 4.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a78dc75cad9ad5de539a5d60a0d9f7b57f13e6bd092e915437e85fd3cb0a509d
BLAKE2b-256 checksum
How to use checksums
455a06be8e97114d327955660dcbc4086a8d5a3819a9ae762e4e04059cc9eccf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.9

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1

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