You are on page 1of 3

1) What is the difference between

a. Data type and data structure


b. Linear and non linear data structure
c. Singly and doubly linked list
2) Find the length of linear list of an array has element numbered as [-10,-
9….,15].
3) Write a program for linear searching in an array.
4) Write a program for insertion in sorted array using bisect module.
5) Write a program for transversing a linear list.
6) Define- a) remove() b)bisect() c)insort()
7) What is list comprehension? Give an example.
8) What are the operations performed on stack?
9) What is regular two dimension list?
10) Where does 2D list stores its element internally?
11) Define the following and also state where they are implemented:-
a) LIFO
b) FIFO
12) Is ragged list a nested list?
13) Predict the output
i) b=[[9,6],[4,5],[7,7]]
x=b[:2]
x[1].append(10)
print(x)
14) Enlist some advantages of list comprehension.
15) Predict the output:-

Stack=[“A”, “J”,”P”,”N”]

a)Stack.pop() b)Stack.append(S) c)Stack.pop()

16) What is the situation called when an insertion is attempted in a full stack
and in an empty stack?

17)Create a list named “mylist” using :- a) for loop. b) using list


comprehension.
18) Which operation is used to add a new element in stack? Also write the
syntax.

19) Find the error.

result=[ ]

for x as [10,5,2]

for y in[2,3,4]

result.append(x**y)

print result

20) write the difference between linear and binary search.

21) Given range (1 to 50), create a list using list comprehension having numbers
from given range that are multiples of three.

22)Write the algorithm for PUSH operation.

23) Write a list comprehension for the following output:

[2,3,4,10,12,14,16]

24) What are the properties of regular 2D list?

25) find the error

A={num if num<5: else:num*2 for num in range(2,9)}

26) What are the types of data structures?

27) What is the method for incrementing and decrementing an element in stack?

28) What is the function of Lsearch( )?

You might also like