ITEC33 Flashcards
A linear data structure which follows order in which the operations are performed. Order may be LIFO or FILO
Stack
Storing an element on the stack
push()
removing an element from the stack
pop()
get the top data element of the stack without removing it
peek()
check if stack is full
isFull()
check if stack is empty
isEmpty()
the way to write arithmetic expression
notation
3 different notation
Infix Notation
Prefix (polish) notation
Postfix (Reverse-polish) notation
An abstract data structure. It follows FIFO methodology
Queue
add an item to the queue
enqueue()
remove an item to the queue
dequeue()
a sequential search is made over all items one by one
linear search
every item is checked and if a match is found, then the particular item is returned
linear search
is a fast search algorithm with run-time complexity of O(log n)
binary search
this search algorithm works in the principle of divide and conquer
binary search