Which of the following is not true about linked lists?
Insertion is O(n2)
Deletion is O(n)
Searching is O(n)
All of these
Answer: Option A.
We maintain pointers to the node(s) at the head and tail of the linked list and so performing a traditional insertion to either the front or back of the linked list is an O(1) operation. Random insertion has complexity O(n)
Evaluate following expression:
a=b>c && b-c= a+c
None of these
Answer: Option B.
Substituting values we get (((3+6)>4)&&((6-4)<2))|| ((6+2)>=(3+4)) i.e. ((1)&&(0))||(1)= 1
typedef float height ;
height men, women;
define men and women as 100 element floating point
define men and women as 100 floating point variables
define height, men and women as floating point variables