-
N be the number of nodes and m be number of edges in a graph
n be the number of nodes and m be number of edges in a graph.
The number of edges in any undirected connected graph is at least
Select one:
a) n
b) n-1
c) None of the above
d) n(n-1)/2
-
A multi-way search tree
A multi-way search tree has n items. The number of external nodes is Select one:
a) n2
b) logn
c) n
d) n+1
-
How can a node be inserted in the middle of a linked list?
Skill/Topic: Linked ListA) by repointing the previous and the next elements of existing nodes to the new nodeB) by repointing only the next elements of existing node to the new nodeC) by repointing only the Previous elements of existing node to the new nodeD) None of the above Explanation: by repointing the previous and the next elements of existing nodes to the new node You can insert a node in the...
-
If the depth of a tree is 3 levels, then what is the Size of the Tree?
Skill/Topic: TreeA) 8Explanation: You calculate the size of a tree by using the following formula: size = 2 ^ depth If the depth is 3 levels, then the size is 8, as shown here: 8 = 2 ^ 3
-
What happens when you push a new node onto a stack?
Skill/Topic: Stacks using Linked ListA) the new node is placed at the front of the linked list.B) the new node is placed at the back of the linked list.C) the new node is placed at the middle of the linked list.D) No Changes happens
-
Static Queue Items
Write an algorithm to calculate the number of items in a static queue?
-
Time Complexity of Adding Three Matrices
What is the time complexity of adding three matrices of size NXN cell-by-cell?
-
What is a user-defined data type?
Skill/Topic: Variables and PointersA) A user-defined data type is a group of primitive data types defined by the programmer.
-
Marbles and Floors
You have a 100-story building and a couple of marbles. You must identify thelowest floor for which a marble will break if you drop it from this floor. How fastcan you find this floor if you are given an infinite supply of marbles? What if youhave only two marbles?
-
-
-
Data Structure - character that repeats itself
Given a string of characters (let us say there are about 100 characters or more in the string), what is the most efficient method to use for finding out the character that repeats itself the most?Is it possible for us to use some kind of data structure for this?, if this is so,which is the best one that needs to be used?
-
Stack Overflow
How will you identify Stack Overflow?
-
-
What is the running time to find the depth (dv) of a node v in a binary tree?
Select one:
O(1+dv)
O(n)
O(1)
O(dv) -
How is memory reserved using a declaration statement?
Skill/Topic: Variables and PointersA) Memory is reserved by using a data type in a declaration statement.Explanation: The form of a declaration statement varies depending on the programming language you use. For example, here is a declaration statement for C, C++, and Java:int myVariable;
-
A linked list index is ____ that represents the position of a node in a linked list.
Skill/Topic: Stacks and Queues: Insert, Delete, Peek, FindA) An IntegerB) a variableC) a characterD) a boolean
-
What is a Register?
Skill/Topic: Memory, Abstract Data Types, and AddressesA) A register is a small amount of memory within the CPU that is used to temporarily store instructions and data.Explanation: Random Access Memory is also called a Main Memory. It is called a Volatile memory because; instructions and data contained in main memory are lost once the computer is powered down.
-
What are the various kinds of sorting techniques? Which is has least worst case?
These are some sorting techs,bubble sortquick sortinsertion sortselection sortmerge sortheap sorttell me any more sorting is found..... ad which is best....
Ans