Sunteți pe pagina 1din 2

__________________________________________________

__
Data Structure & Algorithm analysis

Title : Individual Assignment 1

Due Date : 11/10/2017


Lecturers name :

Lecturer : mr.muataz

Name Student ID#


Ahmad Amro Jalkhi 110044195
Academic Honesty Policy Statement

I, hereby attest that contents of this attachment are my own work. Referenced
works, articles, art, programs, papers or parts thereof are acknowledged at the
end of this paper. This includes data excerpted from CD-ROMs, the Internet,
other private networks, and other peoples disk of the computer system.

Students Signature : _____________________________


What is Array?

An array is a data structure that contains a group of elements. Typically these elements are all of the
same data type, such as an integer or string. Arrays are commonly used in computer programs to
organize data so that a related set of values can be easily sorted or searched. For example, a search
engine may use an array to store Web pages found in a search performed by the user. When
displaying the results, the program will output one element of the array at a time. This may be done
for a specified number of values or until all the values stored in the array have been output. While
the program could create a new variable for each result found, storing the results in an array is much
more efficient way to manage memory.

What is dynamic Array?

A dynamic array automatically grows when you try to make an insertion and there is no more space
left for the new item. Usually, the array doubles in size. Additional functionality often comes with a
cost. Here, we need to do some tricky things under the hood when we run out of room. When we
dont have any space for a new item, we have to allocate a bigger array and copy over all of the
elements from the array weve outgrown before we can finally append our item.

What is Linked List?

A linked list is a dynamic data structure. The number of nodes in a list is not fixed and can grow and
shrink on demand. Any application which has to deal with an unknown number of objects will need
to use a linked list.

Types of Linked Lists

A singly linked list

A doubly linked list is a list that has two references, one to the next node and another to previous
node.

Another important type of a linked list is called a circular linked list where last node of the list
points back to the first node (or the head) of the list.

What is Stack Data Structures?

Stack is a linear data structure which follows a particular order in which the operations are
performed. The order may be LIFO (Last In First Out) or FILO (First In Last Out). Mainly the following
three basic operations are performed in the stack: 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 stack. Is Empty: Returns true if stack
is empty, else falls.

S-ar putea să vă placă și