Kavya Elemati has Published 6 Articles

Python Program To Detect A Loop In A Linked List

Kavya Elemati

Kavya Elemati

Updated on 24-Apr-2023 17:37:46

648 Views

A linked list is said to have a loop when any node in the linked list is not pointing to NULL. The last node will be pointing to one of the previous nodes in the linked list, thus creating a loop. There will not be an end in a linked ... Read More

Python Program To Get The Middle Element Of A Linked List In A Single Iteration

Kavya Elemati

Kavya Elemati

Updated on 24-Apr-2023 17:24:17

1K+ Views

Linked list is used for storing the data in non-contiguous memory locations. The nodes containing the data items are linked using pointers. Each node consists of two fields. The first field is used for storing the data and the second field contains the link to the next node. Brute Force ... Read More

Python program to implement binary tree data structure

Kavya Elemati

Kavya Elemati

Updated on 24-Apr-2023 16:58:47

207 Views

A tree is a data structure which consists of nodes. The nodes are connected by the edges. The top most node is called as the root and the bottom most nodes are called as the leaves. Leaves are the nodes that do not have any children. Binary Tree A binary ... Read More

Python Program To Convert An Array List Into A String And Viceversa

Kavya Elemati

Kavya Elemati

Updated on 24-Apr-2023 16:54:40

160 Views

Converting a list into a string One method for converting a list into a string is to iterate through all the items of a list and concatenate them into an empty string. Example lis=["I", "want", "cheese", "cake"] str="" for i in lis: str=str+i ... Read More

Collections in Python

Kavya Elemati

Kavya Elemati

Updated on 24-Apr-2023 16:47:24

2K+ Views

In python, collections are the containers used for storing the data. The built-in data structures in python are tuples, lists, sets and dictionaries. The collections class will provide additional data structures apart from the built-in data structures. Some of the data structures in the ‘collections’ module − Counter ... Read More

Python Program To Add Elements To A Linked List

Kavya Elemati

Kavya Elemati

Updated on 24-Apr-2023 16:44:53

459 Views

What is a Linked List When data is not stored in continuous memory locations, it takes a lot of time to search all the memory locations to get the required data. To prevent this, we use Linked Lists. A linked list in Python is a data structure that stores items ... Read More

1
Advertisements