Professional Documents
Culture Documents
Structure and Algorithm
Structure and Algorithm
Structure and Algorithm
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
Ar recursice function calls itself the memory for a called function is allocated on
top
-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
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
Dijkstra algorithm works correctly because all edge weights are non negative and
the vertex woth the laest shortest path estimate is always chosen
-Negative
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 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 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
Heap is called a
-Max heap or Min Heap
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
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
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