ITE/CS no.5 Flashcards
A type of control structure that enables programs to perform statements repeatedly as long as a condition remains true.
LOOPING CONTROL STRUCTURE
Also called finite loops
INDEX LOOPS
Also called unended loops
INFINITE LOOPS
- Repeats a statement or group of statements while a given condition is true.
- It tests the condition before executing the loop body.
- minimum output is 0 or more
WHILE LOOP
- It executes the code block once, before checking if the condition is TRUE, then it will repeat as long as the condition is TRUE.
- minimum output is 1 or more
DO WHILE LOOP
- A repetition control structure that allows you to efficiently write a loop that needs to execute a specific number of times
- the minimum output is 0 or more
FOR LOOP
It is a collection of data items, all of the same type, accessed using a common name.
ARRAYS
These are declared by providing more than one set of square [ ] brackets after the variable name in the declaration statement.
MULTIDIMENSIONAL ARRAYS
________ dimensional arrays do not require the dimension to be given if the array is to be completely initialized.
ONE DIMENSIONAL ARRAYS
these are used to rearrange a given array or list elements according to a comparison operator on the elements
SORTING ALGORITHMS
list in which data items are placed in a particular order
SORTED LIST
list in which data items are placed in no particular order; the only relationships between data elements are the list predecessor and successor relationships.
UNSORTED LIST
A category of unsorted list in which the arrangement of the elements are in decreasing order, then you need to sort it in increasing order
WORST CASE
A category of unsorted list in which the arrangement of the elements are in random order, then you need to sort it in increasing order
AVERAGE CASE
A category of unsorted list in which the arrangement of the elements are in increasing order, then you need to sort it in increasing order
BEST CASE