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
is an improved variant of binary search
interpolation search
the data collection should be in a sorted form and equally distributed
interpolation search
refers to arranging data in a particular format
sorting
specifies the way to arrange data in a numerical or lexicographical order
sorting
this sorting algorithm is comparison-based algorithm in which each pair of adjacent element is compared and the elements are swapped if they are not in order
bubble sort
is an in-place comparison-based sorting algorithm where a sub-list is maintained which is always sorted
insertion sort
the smallest element from the unsorted array is swapped with the leftmost element and that element becomes a part of the sorted array
selection sort
sorting technique based on divide and conquer technique.
merge sort
sorting that divides the array into equal halves and then combines them in a sorted manner
merge sort
is a highly efficient algorithm and is based on partitioning of array of data into smaller arrays
quick sort
is a highly efficient sorting algorithm and is based on insertion sort algorithm
shell sort