#### Electrical engineering

• ( 1 ) Partition and exchange sort is ........

• 1) quick sort
• 2) bubble sort
• 3) heap sort
• 4) tree sort
• Discussion in forum
Answer : 1) quick sort
Solution : Quick sort Partition and exchange sort.

discussion

Answer : 1) quick sort

• ( 2 ) Two main measures for the efficiency of an algorithm are

• 1) Processor and memory
• 2) Complexity and capacity
• 3) Time and space
• 4) Data and space
• Discussion in forum
Answer : 3) Time and space
Solution : Time and space two main measures for the efficiency of an algorithm.

discussion

Answer : 3) Time and space

• ( 3 ) What algorithm technique is used in the implementation of Kruskal solution for the MST?

• 1) Divide-and-Conquer Technique
• 2) Greedy Technique
• 3) Dynamic Programming Technique
• 4) The algorithm combines more than one of the above techniques
• Discussion in forum
Answer : 2) Greedy Technique
Solution : Greedy Technique is used in the implementation of Kruskal solution for the MST.

discussion

Answer : 2) Greedy Technique

• ( 4 ) The time complexity of binary search in best, worst cases for the array of size N is

• 1) N, N2
• 2) N, N
• 3) 1, logN
• 4) 1, NlogN
• Discussion in forum
Answer : 3) 1, logN
Solution : In best case if the required element is at the middle then it takes O( 1 ) time other wise it takes O( log n ) time in worst case.

discussion

Answer : 3) 1, logN

• ( 5 ) This algorithm scans the list by swapping the entries whenever pair of adjacent keys are out of desired order

• 1) Insertion sort
• 2) Bubble sort.
• 3) Shell sort.
• 4) Quick sort.
• Discussion in forum
Answer : 2) Bubble sort.
Solution : Bubble sort only is the algorithm from the given options which compares the adjacent keys

discussion

Answer : 2) Bubble sort.

• ( 6 ) Find the odd one out from the following categories of algorithms

• 1) Bin-packing
• 2) OBST
• 3) N-Queens
• 4) 15-Puzzle
• Discussion in forum
Answer : 1) Bin-packing
Solution : This one belongs to NP-Class category.

discussion

Answer : 1) Bin-packing

• ( 7 ) Let G be a graph with 'n' nodes and let 'm' be the chromatic number of the graph. Then the time taken by the backtracking algorithm to color it is

• 1) O(nm)
• 2) O(n+m)
• 3) O(mnm)
• 4) O(nmn).
• Discussion in forum
Answer : 4) O(nmn).
Solution : As the number of internal nodes in the state space tree are mn, and O(mn) is the time spent by the NextValue algorithm to determine the children corresponding to legal colorings. Hence the total time is bounded by O(nmn).

discussion

Answer : 4) O(nmn).

• ( 8 ) Find the odd one out from the following categories of algorithms

• 1) Bin-packing
• 2) OBST
• 3) N-Queens
• 4) 15-Puzzle
• Discussion in forum
Answer : 1) Bin-packing
Solution : This one belongs to NP-Class category.

discussion

Answer : 1) Bin-packing

• ( 9 ) What would be the cost value for any answering node of a sub tree with root 'r' using branch-bound algorithm?

• 1) Maximum
• 2) Minimum
• 3) Optimal
• 4) Average
• Discussion in forum
Answer : 2) Minimum
Solution : Because the objective in branch-bound algorithms is to minimize the objective function

discussion

Answer : 2) Minimum

• ( 10 ) Which of the following versions of merge sort algorithm does uses space efficiently?

• 1) Contiguous version
• 2) Array version
• 3) Linked version
• 4) Structure version
• Discussion in forum