Structure and Algorithm

You might also like

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 4

An array is used to store a collection of data but it is often more useful to think

an array of an array as a collection of variables of the same type


-True

Loop is also called variant and not invariant


-False

Count controlled lopps is a type of an iteration


-False

List is a way to group together relate piece of inforamtion so that they are easy
to read and understand
-True

Iterative control statement are used when we want to repeat the executin of one or
more statements for specified number if times
-True

The acronym LIFO stands for Long In First Out


-False

A simple data type can store only one value at a time


-True*

The recursion is the repeated application of recursive or definition


-False

Indexed array are arrays that with name keys


-False

A queue is a collection of entities that are maintained in a sequenced and can be


modified by the addtion of entitites at one end of the sequence and the removal
from the end of the sequence
-false

Ar recursice function calls itself the memory for a called function is allocated on
top
-True

An invariant is a statement about program variables that is true everytie thee


execution of the program reaches the invariant
-True

Stacks is also called a algorithm Queue


-False"

The acronym FIFO stands for first in first out


-True

Array holds multiple value whereas an ordinary value hold a single value
-True

Enqueqeu means to insert an item into the back of the queue dequeque means
inserting the front item
-False

A loop variant is a property of a prgoram loop that is true before each iteration
-True
Multidimentional array is not a tyoe if array
-false

In an entry controlled loop, a conditiokn is checked before execution the body of


the loop it is called prechecking loop
-true

a simple data tyoe can store only one value at a time


-True

An iteration is a data structure which can store a fixed size collection of


elements of the same data type
-False

A priority queue acts like a queue in that you dequeue an item by removing it from
the front
-Priority

A binary tree where the left child contains only nodes with values less than the
parrent node, and xhere the right child only contains nodes with values greater
than or equal to the parent
-Yes

Sorting is the process of arranging objects in a certain sequence or order


according to specific rule
-True

Dijkstra algorithm works correctly because all edge weights are non negative and
the vertex woth the laest shortest path estimate is always chosen
-Negative

A sorting algorithm used for numbers


-Radix

Programming is a method of solving complex problems by breaking them down into


simpler steps.
-Dynamic

The four most common are probably line graph bar graph and histogram and pie charts
and
-Cartesian

This is the Best Sorting algorithm that the time complexity of quicksort is 0(n log
n) in the best case, O(n log n) in the average cae and O(n 2 in the worst case)
-Quicksort

Is one of the most powerful and advance data structure It is non linear data
structure compared to arrays linked list stack and queue It represent the nodes
represented the nodes conencted by edges
-Tree

A graph consist of a set of nodes or vertices together with a set of edges or arcs
where each edge joints two
-Vertices

Is any process of arranging items systematically and has two common yet distinc
meanings ordering arraging items in a sequence ordered by some criterion
categorizing grouping items with similar properties
-Sorting

The Floyd mWarshall algorithm outputs the correct result as long as no negative
cycles exist in the input graph
-True

The algorithm is a graph searrch algorithm that finds the shortest path between a
given source vertex and al other vetices in the graph
-Dijkstra

Algorithm work recursively constructing a set of objects from the smallest possible
constituent parts
-Greedy

A data structure that is used to store keys value pairs


-Hash table

A priority dequeue aacts like a queue in that you dequeue an item by removing it
from the front
-False

Hashing provides a more realiable and method of data retrieval than any other data
structure
-Flexible

A binary search tree also known as an ordered


-binary tree

A grapgh is a data structure that has two types of elements vertices and edges
-Graph

A hash function that returns a unique hash number is called a hash function
-Universal

The acronym FIFO stands for


-First In First Out

Heap is called a
-Max heap or Min Heap

A binary search tree also known as an ordered


-Binary Tree

A data structure that has two types of elements


-GRAPH

Sorting is any process of arranging items systematically and has two common yet
distinc meanings
-True

A hash funtion takes a group of charaters called a key and maps it to a value of a
certain lenght
-True

The hash table should be an arraya with the lenght about _ times the maximum number
of keys that will aactually be in the table and.
Size of the hash table array should be a prime number
-1.3

A graph is collection of points called vertices and line segments connecting those
points called edges
-True

A radix is a specific tree based data structure which all the nodes of tree are in
a specific order
-No it must Heap

Sorting is a process of arranging objects in a certain sequence or order according


to specific rules
-True

memory is used to store local variables and function call while heap memory is used
to store objects in java
-Stack

In c++ hashinh is a techniqu to directly search the location of desired data on the
disk wothout using index structure
-Flase

Greedy algo is efficient whereas Dynamic programmung is more effecient


-False

Is another sorting technique and has an algorithm that has a reasonably profiecent
space time complexity
-Merge sort

Bellman algorithm is useful in finding shortest path from a given source vertex to
all other vertcies even if the graph contains a weight edge
-NEGATIVE

Programming is a method of solving complex problems by breaking them down into


simpler steps
=dynamic

You might also like