0% found this document useful (0 votes)
3 views4 pages

DS Imps For Cce-2

The document covers key concepts in data structures, including dynamic memory allocation, linked lists, trees, and sorting algorithms. It explains the characteristics and traversal methods of various linked lists and trees, as well as sorting techniques like bubble sort, selection sort, and quick sort, along with their time complexities. Additionally, it discusses search algorithms, specifically binary and sequential search, highlighting their principles and complexities.

Uploaded by

aarnav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views4 pages

DS Imps For Cce-2

The document covers key concepts in data structures, including dynamic memory allocation, linked lists, trees, and sorting algorithms. It explains the characteristics and traversal methods of various linked lists and trees, as well as sorting techniques like bubble sort, selection sort, and quick sort, along with their time complexities. Additionally, it discusses search algorithms, specifically binary and sequential search, highlighting their principles and complexities.

Uploaded by

aarnav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

DS IMPS FOR CCE-2

GAURAV VERDHAN MAHESHWARI (CE-4C 158)

CHAPTER - 3

1.​ DMA stands for Dynamic Memory Allocation.


2.​ Circular Linked list the last node’s address pointer
points to the starting node of the linked list.
3.​ In a circular linked list we can traverse through it until a
base condition is met.
4.​ AVAIL = NULL is use to define overflow condition in a
linked list
5.​ START = NULL is use to define underflow condition in a
linked list
6.​ There is only one pointer in the circular linked list.
7.​ In a doubly linked list there are 2 pointers.
8.​ The 2 pointers of the doubly linked list are Llink and
Rlink.
9.​ In a doubly linked list we can traverse in both directions.
10.​To insert an element in a doubly linked list is most time
consuming and complex out of all linked lists.
11.​ Application of linked list are Polynomial expressions,
multiple algebraic expression storage and symbol table.

CHAPTER - 4

1.​ Tree is an acyclic graph which is a collection of one or


more nodes in random order.
2.​ It also represents the relationship between data
elements in a hierarchical method.
3.​ The left side of a tree is known as the left subtree or left
tree section and is the same with the right side.
4.​ The In-degree is known as the number of incoming
nodes to another node.
5.​ The root node always has 0 in-degree.
6.​ The out-degree is known as the number of nodes going
out of a node.
7.​ The leaf node always has 0 out-degree.
8.​ Directed tree is a tree where each node has 1 in-degree
except the root node.
9.​ Sibling nodes are nodes which have same parent node
10.​Parent nodes have two nodes going out of it.
11.​ Strict binary tree is a tree where every node should have
2 child nodes except the leaf node.
12.​ M-ary tree is a tree where there are ‘m’ number of nodes.
13.​ Binary tree is a tree where every node must have less
than or equal to 2 child nodes.
14.​Complete binary tree is a tree where every node except
the leaf node should have 2 child nodes.
15.​ Depth is the number of edges from the node to the root
of that tree.
16.​ Edge is a line that connects two nodes.
17.​ In BST (binary search tree) every value of the node
greater than the root node should be in the left subtree
and the values greater than the root node should be in
the right subtree.
18.​ AVAIL = NULL is used to define overflow conditions in a
tree.
19.​ ROOT = NULL is used to define underflow conditions in
a tree.
20.​ Traversal in a BST are as following :-​
Preorder (Root-Left-Right),​
Inorder (Left-Root-Right) &​
Postorder (Left-Right-Root)

CHAPTER - 5

1.​ Sorting is the process of arranging elements in either


ascending or descending order.
2.​ There are two types of sorting : Internal and External
sorting.
3.​ Internal sorting is a method where it does not need
external memory for sorting.
4.​ Examples of internal sorting are :- bubble, quick,
selection and insertion sort.
5.​ Bubble Sort compares all the elements one by one and
sorts them based on their values.
6.​ In bubble sort we will get the greatest value after the first
pass if sorting is done in ascending order.
7.​ The number of passes in bubble sort is n-1.
8.​ The time complexity for the bubble sort for best case is
2 2
O(n), for average case is O(𝑛 ) and for worst case is O(𝑛 ).
9.​ In selection sort we can find the smallest values after
the first pass if the sorting is done in ascending order.
10.​ The time complexity for the selection sort for best case
2 2
is O(𝑛 ), for average case is O(𝑛 ) and for the worst case is
2
O(𝑛 ).
11.​ The time complexity for the insertion sort for best case
2
is O(n), for average case is O(𝑛 ) and for worst case is O(
2
𝑛 ).
12.​ Quick sort is based on the divide and conquer method.
13.​ The time complexity for the quick sort for best case is
O(n log n), for average case is O(n log n) and for worst
2
case is O(𝑛 ).
14.​ The pointer used in the quick sort as an anchor is
known as pivot.
15.​ Merge sort is based on the divide and conquer method.
16.​ The time complexity for the quick sort for best case is
O(n log n), for average case is O(n log n) and for worst
case is O(n log n).
17.​ Radix sort the elements from there unit place.
18.​ The time complexity for the quick sort for best case is
O(m+n), for average case is O(m+n) and for worst case is
O(m+n).
19.​ Binary search is a fast and simplest search algorithm
with run-time complexity of Ο(log n).
20.​ Binary search algorithm works on the principle of
divide and conquer.
21.​ For Binary search algorithm to work properly, the data
collection should be in the sorted form.
22.​ Sequential search is a very simple search algorithm.
23.​ In sequential search, a sequential search is made over
all items one by one.
24.​ The time complexity for sequential search is O(n).

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy