... Faculty of Computer Science and Engineering
Department of Computer Science
Page 1/ 5
LAB SESSION 1
BASIC OPERATIONS ON LINKED LIST
1. OBJECTIVE
The objectives of Lab 1 are (1) to ... else valid = 0;
}
Faculty of Computer Science and Engineering
Department of Computer Science
Page 4/5
return pList;
}
a. Rewrite the main...
... Faculty of Computer Science and Engineering
Department of Computer Science
Page 1/ 7
LAB SESSION 1
BASIC OPERATIONS ON LINKED LIST
1. OBJECTIVE
The objectives of Lab 1 are (1) to ... buildPosLinkedList()
{
List pList = new List;
int valid =1;
char choice;
int num;
Faculty of Computer Science and Engineering
Department of Comp...
...
Faculty of Computer Science and Engineering
Department of Computer Science
Page 1/ 4
LAB SESSION 2
POLYNOMIAL LIST
1. OBJECTIVE
The objectives of Lab 2 are
(1) to introduce ... pTemp->data = newdata;
pTemp->next = pHead;
pHead = pTemp;
Faculty of Computer Science and Engineering
Department of Computer Science
Page 2/4...
...
Faculty of Computer Science and Engineering
Department of Computer Science
1/ 3
LAB SESSION 3
RECURSION on BINARY TREE
1. OBJECTIVE
The objectives of Lab 3 are (1) to introduce ...
Listing 1
// this is the content of tree.cpp
#include "Tree.h"
Tree::Tree() {
root = NULL;
Faculty of Computer Science and Engineeri...
... value of g corresponding to n
1 if (n = 1)
1 return 1
2 else
1 return g(n – 1) + 1
End g
n^3*log2(n)
40*2 ^10 24 *10 ^-9
U
n
= U +1
U = 1
O(n)
n -1
1
Faculty of Computer Science and Engineering ...
Faculty of Computer Science and Engineering
Department of Computer Science
Released on 24/08/2 012 20:06:39
1/ 4
DATA STRUCTURES &...
... 4
x
2
4x
3
-
3x
2
-5
+
-
-4x
19
2X
2
+1
3/2x
3x
3
-1/ 2
Faculty of Computer Science and Engineering
Department of Computer Science
Page 2 /10
a. f – k
b. f *k
c. f\ 10
d. f\ x
e. f* f
2
Faculty of Computer ... s2 {1, 9,4,2}
s1{7 ,10 }
s1{2,4,9 ,1, 7 ,10 }s2{rong}
s1{9 ,1, 7 ,10 }
s2{4,2}
pop(SourceStack,x)
pop(SourceStack,y)
Push(SourceStack,...
...
Faculty of Computer Science and Engineering
Department of Computer Science
1/ 4
DATA STRUCTURES & ALGORITHMS
Tutorial 3 Questions
Recursion and Binary Tree
Part 1. Recursion ...
return (compute(a,n)>compute(a,n -1) )?compute(a,n):compute(a,n -1)
3233
6,5,4
4,5,6
Faculty of Computer Science and Engineering
Department of Computer Sc...
...
Faculty of Computer Science and Engineering
Department of Computer Science
1/ 3
DATA STRUCTURES & ALGORITHMS
Tutorial 4 Questions
AVL Tree and Heap
Part 1. AVL Tree ... merge the contents of two binary search trees into one. What is the running time of
your algorithm?
Faculty of Computer Science and Engineering
Department of Comput...