Professional Documents
Culture Documents
Question 1: Complete the Table below and Show the Circular list after each operation, Also mention Error
states if any. The first few are done for you.
1 CreateList(5) [None,None,None,None,None]
length:0,size=5,index=-1
length:0,size=5,index=-1
3 InsertFirst(5,list) [5,None,None,None,None]
length:1,size=5,index=0
4 insertFirst(2,list) [5,None,None,None,2]
length:2,size=5,index=4
5 add(2,3,list) [3,5,None,None,2]
length:3,size=5,index=4
6 add(3,4,list) [3,4,5,None,2]
length:4,size=5,index=4
7 removeFirst(list) [3,4,5,None,None]
length:3,size=5,index=0
8 insertLast(6,list) [3,4,5,6,None]
length:4,size=5,index=0
9 insertFirst(2,list) [3,4,5,6,2]
length:5,size=5,index=4
11 remove(2,list) [4,5,6,None,2]
length:4,size=5,index=4
12 remove(3,list) [4,6,None,None,2]
length:3,size=5,index=4
13 insertFirst(10,list) [4,6,None,10,2]
length:4,size=5,index=3
14 insertLast(20,list) [4,6,20,10,2]
length:5,size=5,index=3
15 removeFirst(list) [4,6,20,None,2]
length:5,size=5,index=3
List ADT and Stack CS-102 L8
Question 2: Convert the Following Expressions to Postfix Notation With and Without USing Stack.
a) ((A + B) – C / (D * E)) ^ F
b) X^Y/(W*Z)+T