CS102-1 Topics

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

Primitive or Non-Primitive Data Structures

2 categories of Data Structures

Linear or Non-Linear

2 categories of Non-Primitive data structures

Data Found and Data is not found

2 outputs of the retrieval operation in Linked List

provides easy manipulation of the pointers and the searching becomes twice as efficient efficient utilization of memory allocation

Advantages of Circular Linked List

Binary Search Tree (BST

All the elements in the left sub-tree are less than the root while elements present in the right sub-tree are greater than or equal to the root node element.

✓ Recursive Call ✓ Some functionalities in browser and editor ✓ Parsing ✓ Expression conversion and evaluation

Applications of Stack

Non-Primitive data structures

Data structures whose data types are complex or data structures that are made or also embedded in a programming language

Primitive data structures

Data structures whose data types are embedded in a particular programming language

complex implementation of operations on linked list structures

Disadvantage of Circular Linked List

Linked List Stack Queue

Examples of Linear Dynamic Data Structures

Array

Examples of Linear Static Data Structures

Tree Graph

Examples of Non-Linear Non-Primitive Data Structures

integer, character, and float or double

Examples of Primitive Data Types

infix to postfix conversion evaluating the expression

For the machine to evaluate an arithmetic expression in an infix form, it should go through (steps)

root node

If a tree is not empty, the topmost node is called

> Efficiency of the program > Data structures are reusable > Data structures are specified by ADT which provides a level of abstraction

Importance of Implementing Data Structures

> allows management of structures > efficient passing of arrays > makes possible to pass address instead of the entire structure. > can return multiple values.

Importance of using a pointer

rear and front

In Queue, the two ends are called

edges

In graph, what connects the vertices to each other

the top

In stack, insertion and deletions are allowed only at one end called

Max-Heap Tree

In this Heap Tree, the key present at the root node must be greatest among the keys present at all its children.

Min-Heap Tree

In this Heap Tree, the key present at the root node must be minimum among the keys present at all its children.

subscripts

Index numbers are also called as

Input-restricted deque

Insertion can be done only at one end of the queue and deletions can be made at both ends of the queue.

Output-restricted deque

Insertion can be made at both ends of the queue and deletion can be made at only one end of the queue

Node

It is a terminology used in data structure which represents a data.

National Institute of Standards and Technology

NIST means?

Traverse Inserting Removing Retrieving

Operations on Singly Linked List

An element with a higher priority would be deleted before an element with a lower priority irrespective of the order in which the elements were inserted.

Rule of the Priority Queue

General Tree

Stores the elements in a hierarchical order in which the top-level element is always present at level 0 as the root element

dequeue operation

The deletion of elements from a queue is referred to as the

pop operation

The deletion of elements from a stack is referred to as the

last-in-first-out (LIFO) principle

The element which is inserted last will be the first to be removed. This is referred to as

front of the queue

The end at which the elements are deleted is referred to as the

top of the stack

The end at which the elements are inserted and removed is referred to as the

rear of the queue

The end at which the elements are inserted is referred to as the

enqueue operation

The insertion of elements into a queue is referred to as the

push operation

The insertion of elements into a stack is referred to as the

Postfix or reverse Polish notation

The operator is placed after the operands. For example, ab+

Prefix or Polish notation

The operator is placed before the operands. For example, +ab.

Infix notation

The operator is placed in between the operands. For example, a + b.

ternary tree

The tree in which each node contain 3 sub-trees are called

Dereferencing

This is the process where a pointer references a location in memory, and obtaining the value stored at that location

first in first out (FIFO) principle

Where the element which is inserted first will be the first to be removed. A new element is inserted at the end of the list

data structure

a data organization, management, and storage format that enables efficient access and modification.

linear list

a data structure allowing insertion and deletion of elements at any position in the list

Binary Tree

a data structure in which each node can have at most 2 children.

singly linked list

a data structure that consists of a sequence of elements each of which contains a reference to the next element in the list

doubly linked list

a data structure that consists of a sequence of elements each of which contains a reference to the previous and next elements in the list

tree

a finite collection of data that are arranged in a hierarchical fashion. The data are generally stored in nodes

Linked list

a linear data structure which is used to maintain a list in the memory. It can be seen as the collection of nodes stored at non-contiguous memory locations. Each node of the list contains a pointer to its adjacent node

Queue

a linear list in which elements can be inserted only at one end called rear and deleted only at the other end called front

Stack

a linear list in which insertion and deletions are allowed only at one end, called top

circular doubly linked list

a linked list where the last element in the list is connected to the first node while the first element is connected to the last node.

circular singly linked list

a linked list where the last element in the list is connected to the first node.

Data Structure (according to KGKikuchi)

a mechanism of computer memory to store, organize, and manipulate data or information for efficient memory utilization.

priority queue

a number (called the priority number) is associated with every element of the queue.

pointer

a programming language object, whose value refers to another value stored elsewhere in the computer memory using its memory address.

Unordered List

a random listing of elements or data and operations can be performed anywhere in the list, although still most of the time insertion happens at the end of the list

tree

a recursive data structure containing the set of one or more data nodes

Data Structure (according to webopedia)

a scheme for organizing related pieces of information.

Heap Tree

a special tree-based data structure in which the tree is a complete binary tree

linear list

a type of list in which each element has a unique successor and predecessor

general list

a type of list structure wherein we are free to add or remove data element anywhere in the list.

deque

a type of queue in which insertions and deletions can be made at both ends of the queue.

it can expand and collapse in size any time

advantage of linked lists to arrays

LIFO (Last-In-First-Out)

allows insertion and deletion of element at the end of the list called top

FIFO (First-In-First-Out)

allows insertion only at the end of the list and we call it the rear while deletion will only be allowed at the start of the list and we call it front

arithmetic expression

an expression which involves arithmetic operators, constants and variables and ultimately evaluates to a numeric value.

subtree

any connected structure below the root or any node.

descendant of a node

any node in the path below the parent node; that is, all nodes in the path from a given node to a leaf are descendants of that node

ancestor of a node

any node in the path from the root to that node

leaf node

any node with no successor

Stacks

are linear data structures in which elements can be inserted and deleted at only one end of the list

Queues

are linear data structures in which elements can be inserted in one end and deleted from the other end.

Data structure (javaTpoint)

as the group of data elements which provides an efficient way of storing and organizing data in the computer so that it can be used efficiently.

leaf node

bottommost nodes in a tree is called

AVL Tree

can be defined as height balanced binary search tree in which each node is associated with a balance factor which is calculated by subtracting the height of its right sub-tree from that of its left sub-tree.

Graph

can be defined as the pictorial representation of the set of elements (represented by vertices) connected by the links known as edges

pointer field

contain the address of the next node in the list

node

data element in a tree data structure is referred to as a

Non-Linear Data Structures

data elements are not arranged in sequential structure and can have multiple successors and predecessors.

Linear Data Structures

data elements are stored in non-hierarchical way where each element has successor and predecessor except the first and last element.

nil or null

h. The pointer field will be set to________ if that will be the last node in the linked list.

Ordered List

if data will be inserted or removed using key, it maybe one or more fields

Arrays

is a collection of similar type of data items and each data item is called an element of the array. The data type of the element may be any valid data type like char, int, float or double

level of a node

its distance from the root

degree of a tree

maximum degree of a node in the tree

M-Way Search Tree

multi-way trees which are generalized versions of binary trees where each node contains multiple elements. In an m-Way tree of order m, each node contains a maximum of m - 1 elements and m children.

Trees

multilevel data structures with a hierarchical relationship among its elements known as nodes.

Data Structure (according to NIST)

organization of information, usually in memory, for better algorithm efficiency

Restricted List

specifically identify where insertion and deletion of data element will take place

Linus Torvalds

the creator and principal developer of the Linux kernel

height of a node

the level of a leaf in the longest path from the root plus 1.

degree of a node

the number of children of a node

singly linked list doubly linked list circular linked list

three common forms of linked list

root node

topmost nodes in a tree is called

one dimensional two dimensional multidimensional

types of arrays

efficient access and modification

what does data structure enables?

parent-child relationship

what relationship does trees have?


Kaugnay na mga set ng pag-aaral

Marketing research chapter 6 smart book

View Set

Chapter 1: The Nature of Fashion

View Set

Rewards and Compensation Exam 2- uark

View Set

CH 5: Sequences - Strings, Lists, and Files

View Set

CH.3 Programming: The cin Object

View Set