human computer interaction lab. of distributed multimedia information systems and applications |...

Post on 01-Apr-2015

213 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

HUMAN COMPUTER INTERACTION

Lab. Of Distributed Multimedia Information Systems and Applications | TUC/MUSICDepartment of Electronic and Computer Engineering

Technical University of Crete

Rontidis Pavlosprontidis@yahoo.gr

Souris Anastasiostassos_souris@yahoo.gr

mDS

http://en.wikipedia.org/wiki/Binary_search_tree

http://en.wikipedia.org/wiki/AVL_tree

http://en.wikipedia.org/wiki/Red_Black_tree

Description: Node-based binary tree with the properties:• A left sub-tree of a node contains only nodes with keys

less than …

Description: AVL tree is a self-balancing binary search tree, and it was the first such data structure to be invented.

Description: A red-black tree is a type of self-balancing binary search tree, a data structure used in computing science, typically used to implement associative arrays.

s

menu

mDS

The purpose of this test is to test basic knowledge on BSTs.Time Limit: 3 minCompleted in: 2minDate finished: 2/22/2011

The purpose of this test is to test two operation on BSTs,Insertion and deletion.Time Limit: 6 minNot taken

The purpose of this test is to test BST traversals.Insertion and deletion.Time Limit: 10 minNot taken

Tap start to start the timer.Tap start to complete or exit the Quiz.

Start Finish

Tap start to start the timer.Tap start to complete or exit the Quiz.

Multiple choice Description…

Answer 1….

Answer 2…

Answer 3…

Start Finish

00:01

The purpose of this test is to test basic knowledge on BSTs.Time Limit: 3 minCompleted in: 2minDate finished: 2/22/2011

The purpose of this test is to test two operation on BSTs,Insertion and deletion.Time Limit: 6 minFailed: 10min Not Completed

The purpose of this test is to test BST traversals.Insertion and deletion.Time Limit: 10 minNot taken

mDS Prototype:Animations List

10

3

178

15

6

2

16

Search for key = 6

Search for key = 9

Node creation & insertion

In-order Traversal

iPhone demo

iPad demo

change options

Change options

10

3

178

15

6

2

16

return practice animation helpoptions

Option screen

mDS

Option screen

mDS

mDS Prototype:Animations List

10

3

178

15

6

2

16

Search for key = 6

Search for key = 9

Node creation & insertion

In-order Traversal

iPhone demo

iPad demo

change options

10

3

178

15

6

2

16

Search 6

return practice animation helpoptions

Enter node’s key:

You tapped inside an empty node.

You tapped inside an empty node.

Enter node’s key: 6

<

10

3

178

15

6

2

16

6 < 10 is True

cancel

10

3

178

15

6

2

16

>6 > 3 is True

cancel

10

3

178

15

6

2

16

>6 < 8 is True

cancel

10

3

178

15

6

2

16

6 = 6 is True

cancel

10

3

178

15

6

2

16

Node found !

cancel

mDS Prototype:Animations List

10

3

178

15

6

2

16

Search for key = 6

Search for key = 9

Node creation & insertion

In-order Traversal

iPhone demo

iPad demo

change options

10

3

178

15

6

2

16

Search 9

return practice animation helpoptions

You tapped inside an empty node.

Enter node’s key:

You tapped inside an empty node.

Enter node’s key: 9

<

10

3

178

15

6

2

16

9 < 10 is True

cancel

10

3

178

15

6

2

16

>9 > 3 is True

cancel

10

3

178

15

6

2

16

9 > 8 is True

cancel

10

3

178

15

6

2

16

Leaf reached.Node not found.

NULL

cancel

mDS Prototype:Animations List

10

3

178

15

6

2

16

Search for key = 6

Search for key = 9

Node creation & insertion

In-order Traversal

iPhone demo

iPad demo

change options

10

3

178

15

6

2

16

Insert 9

Node created !

10

3

178

15

6

2

16

Enter node’s key:

You tapped inside an empty node.

Enter node’s key: 9

You tapped inside an empty node.

<

10

3

178

15

6

2

16

current.key root.key 9 < current.key

Next step:current current.left

cancel

>

10

3

178

15

6

2

16

current.key 39 > current.key

Next step:current current.right

cancel

found positionfor key = 9

10

3

178

15

6

2

16NULL

Pointer to NULL:Allocate space for new node.

current.key 89 > current.key

cancel

10

3

178

15

6

2

16

Algorithm finished.Result: Insertion completed.

9

Node inserted.

cancel

mDS Prototype:Animations List

10

3

178

15

6

2

16

Search for key = 6

Search for key = 9

Node creation & insertion

In-order Traversal

iPhone demo

iPad demo

change options

10

3

178

15

6

2

16

In-order traversal

10

3

178

15

6

2

16

Gesture initiated an in-order traversal.

cancel

10

3

178

15

6

2

16

Printed: 2 Recursion to left sub-tree.

cancel

10

3

178

15

6

2

16

Printed: 2, 3

cancel

10

3

178

15

6

2

16

Printed: 2, 3, 6

cancel

10

3

178

15

6

2

16

Printed: 2, 3, 6, 8

cancel

10

3

178

15

6

2

16

Printed: 2, 3, 6, 8, 10 Visited root.

cancel

10

3

178

15

6

2

16

Printed: 2, 3, 6, 8, 10, 15 Recursion to right sub-tree.

cancel

10

3

178

15

6

2

16

Printed: 2, 3, 6, 8, 10, 15, 16

cancel

10

3

178

15

6

2

16

Printed: 2, 3, 6, 8, 10, 15, 16, 17

cancel

10

3

178

15

6

2

16NULL

cancel

In-order traversal completed.Keys printed in ascending order.Printed: 2, 3, 6, 8, 10, 15, 16, 17

mDS Prototype:Animations List

10

3

178

15

6

2

16

Search for key = 6

Search for key = 9

Node creation & insertion

In-order Traversal

iPhone demo

iPad demo

change options

top related