Data Structures数据结构基本介绍(1)

1.what is Data Structure?

  • A data structure is a memory used to store and organize data
  • It is also used for processing, retrieving, and storing data

2. what is classification of Data Structure?

在这里插入图片描述

2.1 what is Linear data structure?

  • 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 of linear data structures are array, stack, queue, linked list, etc

2.2 what is Non-linear data structure?

  • Data structures where data elements are not placed sequentially or linearly are called non-linear data structures.
  • Examples of non-linear data structures are trees and graphs.

2.3 what is Static data structure:?

  • Static data structure has a fixed memory size.
  • It is easier to access the elements in a static data structure.
  • An example of this data structure is an array.

2.4 what is Dynamic data structure?

  • In dynamic data structure, the size is not fixed.
  • It can be randomly updated during the runtime
  • Examples of this data structure are queue, stack, etc.

2.5 what is Array?

  • An array is a collection of data items stored at contiguous memory locations.

在这里插入图片描述

2.6 what is Linked List?

  • Like arrays, Linked List is a linear data structure.
  • Unlike arrays, linked list elements are not stored at a contiguous location; the elements are linked using pointers.
    在这里插入图片描述

2.7 what is Stack?

  • Stack is a linear data structure
  • The order may be LIFO(Last In First Out) or FILO(First In Last Out).
  • In stack, all insertion and deletion are permitted at only one end of the list.

在这里插入图片描述

mainly the following three basic operations are performed in the stack:
Initialize: Make a stack empty.
Push: Adds an item in the stack. If the stack is full, then it is said to be an Overflow condition.
Pop: Removes an item from the stack. The items are popped in the reversed order in which they are pushed. If the stack is empty, then it is said to be an Underflow condition.
Peek or Top: Returns top element of the stack.
isEmpty: Returns true if the stack is empty, else false.

2.8 what is Queue?

  • Queue is a linear structure
  • The order is First In First Out (FIFO).
  • In the queue, items are inserted at one end and deleted from the other end.

2.9 what is Binary Tree?

  • Binary Tree are hierarchical data structures.
  • A 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.
  • It is implemented mainly using Links.
  • a pointer to the topmost node in the tree. If the tree is empty, then the value of root is NULL

2.10 what is Binary Search Tree?

  • The left part of the root node contains keys less than the root node key.
  • The right part of the root node contains keys greater than the root node key.
  • There is no duplicate key present in the binary tree.

2.11 what is Heap?

  • A Heap is a special Tree-based data structure in which the tree is a complete binary tree.
  • Heaps can be of two types:

在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值