Assignment 2 : Control Structures and Loops
Reviewed by technical_saurabh
on
March 16, 2021
Rating:
team-analytics.blogspot.com
Reviewed by technical_saurabh
on
March 16, 2021
Rating: 5
Reviewed by technical_saurabh
on
March 16, 2021
Rating: 5
Reviewed by technical_saurabh
on
February 12, 2021
Rating: 5
Reviewed by technical_saurabh
on
February 12, 2021
Rating: 5
Reviewed by technical_saurabh
on
February 12, 2021
Rating: 5
Reviewed by technical_saurabh
on
February 12, 2021
Rating: 5
Reviewed by technical_saurabh
on
February 12, 2021
Rating: 5
Reviewed by technical_saurabh
on
February 12, 2021
Rating: 5
Reviewed by technical_saurabh
on
February 12, 2021
Rating: 5
Reviewed by technical_saurabh
on
February 12, 2021
Rating: 5
Reviewed by technical_saurabh
on
February 12, 2021
Rating: 5
Reviewed by technical_saurabh
on
February 12, 2021
Rating: 5
Web Technology Slip 20
Reviewed by technical_saurabh
on
February 12, 2021
Rating: 5
Web Technology Slip 19
Reviewed by technical_saurabh
on
February 12, 2021
Rating: 5
Reviewed by technical_saurabh
on
February 12, 2021
Rating: 5
Web Technology Slip 17
Answer :
Answer :
Reviewed by technical_saurabh
on
February 11, 2021
Rating: 5
Web Technology Slip 15
Answer :
Answer :
Reviewed by technical_saurabh
on
February 11, 2021
Rating: 5
Web Technology Slip 14
Answer :
Reviewed by technical_saurabh
on
February 11, 2021
Rating: 5
Answer :
Reviewed by technical_saurabh
on
February 11, 2021
Rating: 5
1. A mathematical Model with a collection of operation
defined on that model is called.
Answer : 2) Abstract Data type
2. In an ADT
Answer : 4) All of
the Above
3. A data structure is an aggregation of
Answer : 3) Atomic and Composite Data are encapsulated.
4. ………….. is/are the linear data structures.
Answer: 4) All of the Above
5. ……….. is a non-linear Data Structures.
Answer: 3) Graph
6. Time complexity of a program refer to:
Answer : 3) Amount of time a program needs to run form
completion.
7. Space complexity of an algorithm is the maximum amount of
………… required by it during execution.
Answer : 1) Memory space
8. An algorithm that indicates the amount of temporary
storage required for running the algorithm i.e., the amount of memory needed by
the algorithm to run to completion is termed as
Answer : 3) Space complexity.
9. To verify whether a function grows faster or slower than
the other function, we have some asymptotic or mathematical notations, which
is/are……….
Answer : 3) Both (a) and (b)
10. A function in which f(n) is Ω(g(n)), if there exist
positive values k and c such that f(n)>=c*g(n), for all n>=k. This
notation defines a lower bound for a function f(n).
Answer : 2) Big Omega Ω(f)
11. An algorithm that requires ………… operations to complete its
task on n data elements is said to have a linear runtime.
Answer: 1) 2n+1
12. The complexity of adding two matrices of order m*n is
Answer: 2) mn
13. What does it mean when we say that an algorithm X is
asymptotically more efficient than Y?
Answer: 2) X will always a better choice for large inputs.
14. Which of the following data structure store the homogeneous
data elements?
Answer: 1) Array
15. Arrays are best data structures……….
Answer : 1) for relatively
permanent collections of data
16. The memory address of the first element of an array is
called…..
Answer : 4) base address
17. The memory address of the fifth element of an array can be
calculated by the formula…….
Answer : 1) Loc(Array[5] = Base(Array)+w(5-lower bound), where w
is the number of words per memory cell for the array.
18. Which of the following expression access the (I,j)th of a m x n matrix stored in column major form?
Answer : 2) m x (j-1)+1
19. The smallest element of an array’s index is called its….
Answer: 1) Lower bound.
20. Which of the following is also called as partition exchange
sort?
Answer: 4) Quick
21. What is an internal/in-place sorting algorithm?
Answer : 2) Algorithm that user main memory during the sort
22. What is an external/out-place sorting algorithm?
Answer : 1) Algorithm that user taps or disk during the sort.
23. A sorting technique is called stable if it…………
Answer : 2) Maintains the relative order of occurrences of
non-distinct elements.
24. Which of the following is not stable sort?
Answer :4) Quick Sort.
25. Which of the following is not an internal sorting algorithm?
Answer : 3) Merge sort.
26. The complexity of Bubble sort algorithm is ….
Answer : 2) O(log n)
27. If the given input array is sorted or nearly sorted, which of
the following algorithm gives the best performance?
Answer : 1) Insertion sort.
28. In a circularly linked list organization, insertion of a
record involves the modification of
Answer : 3) 2 pointer
29. The concatenation of two lists is to be performed in o (1)
time. Which of the following implementation of a list should be used?
Answer : 3) Circular doubly linked list.
30. Which of the following operations is performed more
efficiently by doubly linked list then by linear liked list?
Answer : 1) Deleting nodes whose location is given
31. Consider the linked list of n elements. What is the time taken to insert an element after an element pointed by some pointer?
Answer : 1) O(1)
32. …………. Is an ordered collection of data in which each element
contains the location of the next element known as?
Answer : 3) linked list
33. What does an empty linked list consist?
Answer : 4) a null head pointer
34. In the last node of the circular linked list the link field
contains?
Answer : 3) Pointer to first node.
35. In a Circular linked list:
Answer : 2) There is no beginning and no end.
36. What is the time complexity to count the number of elements in
the liked list
Answer : 2) O(n)
37. A stack is ………
Answer : 1) Linear data structure.
38. A stack is linear data structure in which data is stored and
retrieved in a…….
Answer : 2) Last in First out(LIFO)
39. Elements are added at which position of the stack?
Answer : 3) Top
40. In a stack, if a user tries to remove an element form empty
stack it is called….
Answer : 1) Underflow.