Monday, 24 June 2013

DATA STR. USING C++

DATA STR. USING C++
SEM-VI, 2012
B.TECH EXAMINATION
UTTARAKHAND TECHNICAL UNIVERSITY
(UTU)

Time: 3 hours
Total Marks: 100
Attempt any four of the following:
  1. Explain the meaning of following expression f(n) is n0(1)
  2. Prove the following statement
    2n+a is 0(2n)
  3. Find the computational complexity for the following loop
    for (cnt 4 = 0, i=1; i<=n, i*=2)
    for (j=1; j<=i, j++)
    cnt 4++;
  4. Write a member function to check whether two singly lists have the same contents.
  5. Write a member function to reverse a singly linked list using only one pass through the list.
  6. Write a function to insert a node in the middle of a doubly linked list.