DS160123 Useful information about Python

Date:- 10/2/20231. What is a Data Structure in python?

The Data Structure is a description of how data is organized (stored), modified, and accessed. By specifying how different sorts of data connect to one another, it also develops relationships and forms algorithms. The data structure of any computer language is a crucial concept in algorithmic design.

  1. What Are the Various Data Structure Types?

The numerous forms of data structures are as follows:

:black_circle: Lists: Lists are a collection of related objects that are linked to the data items before and after them. • Arrays: Arrays are a collection of values with the same value.

:black_circle: Stacks: LIFO data structures, or stacks, are those in which the element placed last is accessed first.

:black_circle: Queues: Queues are a first-in-first-out data structure

Graphs: In this data structure, data values are stored in nodes connected by edges. :black_circle: Heaps: A binary tree data structure that allows you to compare parent and child data values. :black_circle: Dynamic memory allocation should be implemented. 4 Give three reasons why NumPy arrays are better than Python lists. It is more efficient to use a NumPy array. The NumPy arrays continue to grow in size. It has the potential to be thirty times faster than Python lists. successfully.

Trees: Like a linked list, the data values are linked in a hierarchical structure

:black_circle: Hash table: A table in which each value is assigned a key and then preserved, making individual values more accessible.

  • Heaps : A binary tree data structure that allows you to compare parent and child data values.
2 Likes

Good explanation @sms18680

@sms18680

Nice explanation, keep the pace up :relaxed:.
Keep Learning more and share your valuable thoughts to other as well.