Skip to main content

Data Structure Package By Pappalaity

Project description

Laity Data Structure

A data structure is a way of organizing and storing data in our machine so that it can be accessed and used efficiently. It refers to the logical or mathematical representation of data, as well as the implementation in a computer program.

Data structures can be classified into two broad categories:

  • Linear Data Structure: A data structure in which data elements are arranged sequentially or linearly, where each element is attached to its previous and next adjacent elements, is called a linear data structure. Examples are array, stack, queue, etc.
  • Non-linear Data Structure: Data structures where data elements are not placed sequentially or linearly are called non-linear data structures. Examples are trees and graphs.

The non-primitive data structures can also be classified based on whether they are built-in or user-defined.

In this Data Structures (Laity Data Structures) Packages we will present the following non primitive data structure:

Installation

  • Packages built using Python

  • Version : 0.0.2

  • To Install it execute the following command line:

    • pip install laity-data-structures-py
  • Import Any Existing class in your project and Enjoy !

  • Author : Pappalaity

Stack

Stack is a linear data structure that follows the principle of LIFO (Last In First Out) to store data. Some basic operations allow us to perform different actions on a stack.

Basic operations on stack

  • push() to insert an element into the stack
  • pop() to remove an element from the stack
  • top() Returns the top element of the stack.
  • isEmpty() returns true if the stack is empty else false.
  • size() returns the size of the stack.

In this Packages We firstly implement for the Stack these following functions:

Data Structure Methods
Stack push(), pop(), peek(), is_empty(),size(),display()

Queue

Same as Stack, Queue is also a linear data structure. However Queue store data in a FIFO(FIrst In First Out) manner.

Basics operations of Queue

  • Enqueue() Adds (or stores) an element to the end of the queue.
  • Dequeue() Removal of elements from the queue.
  • Peek() or front() Acquires the data element available at the front node of the queue without deleting it.
  • rear() This operation returns the element at the rear end without removing it.
  • isFull() Validates if the queue is full.
  • isNull() Checks if the queue is empty.

In this Packages We firstly implement for the Queue data structure these following functions:

Data Structure Methods
Queue enqueue(), dequeue(), peek(), rear(), is_empty(), display()

Linked List

A linked list is a linear data structure that includes a series of connected nodes that are not stored at contiguous memory location.

It is represented by a pointer to the first node of the linked list. The first node is called the head. If the linked list is empty, then the value of the head is NULL. Each node in a list consists of at least two parts:

  • Data
  • Pointer (Or Reference) to the next node

Basic operations

  • Insert: we can insert at the Beginning, Insert at the End, Insert at a Specific Position
  • Delete: we can delete from the Beginning, from the End, at a Specific Position
  • Display: disply by traversing the linked list from the head to the end, visiting each node in turn.
  • Search: look for a node with a specific value or property.
  • Get Length: count the number of nodes.
  • Access: Access data in a specific node by traversing the list or directly indexing if the list supports it.
  • Update: update the data in a specific node by traversing the list to find it and modifying its data.
  • Concatenate: Concatenate two linked lists by making the last node of the first list point to the head of the second list.
  • Reverse: Reverse the order of nodes in the linked list.
  • Sort: Sort the linked list by rearranging nodes according to a specific criterion, such as value or property.

In this Packages We firstly implement for Linked List these following functions:

Data Structure Methods
Singly Linked List head(),insert(),insertAtBeginning(),insertAfter(), delete(), search(), traverse(),display()

Tree

Binary Tree

Tree is a non linear hierarchical data structure where nodes are connected by edges. The binary tree is a tree data structure in which each node has at most two children, which are referred to as the left child and the right child.

The topmost node is called root and the bottommost nodes or the nodes with no children are called the leaf nodes. A node contains:

  • Data
  • Pointer to left child
  • Pointer to the right child

In this Packages We firstly implement for the Binary search Tree these following functions:

Data Structure Methods
Binary Search Tree (BST) head(),insert(), search(), printInorder(), printPreOrder(),printPostOrder()

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

laity_data_structures-0.1.0.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.

laity_data_structures-0.1.0-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file laity_data_structures-0.1.0.tar.gz.

File metadata

  • Download URL: laity_data_structures-0.1.0.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for laity_data_structures-0.1.0.tar.gz
Algorithm Hash digest
SHA256 82d949af2d762a5f98421516b42a9784333663489ae73f21f38fca0951deca57
MD5 f9dc6aeccf7f3ddfc672d38eea539b3e
BLAKE2b-256 9fcf4e3a402ed9e74361396a26ab0e159ebd5f49cb52e46017f3da2f97b24834

See more details on using hashes here.

File details

Details for the file laity_data_structures-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for laity_data_structures-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 44df5096d0a2ba8412c6ce79a6b90a502ff931710069618d95c716e65bbd1b29
MD5 c3371652338ba8fdd96ed773a91b4f6e
BLAKE2b-256 2f4c1cb4bdf212b318a77c8b968e5f547ecb6dac22acc7ad22d345bf3b74e121

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