introex - Engineering Exercises 1. For each of the...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Engineering xercises 2. For the directed tree below, list the vertices in the Exercises 1. For each of the following problems, give a precise atement of the problem in the style used on page 3 order they would be visited by a pre-order traversal, a post-order traversal and an in-order traversal. a statement of the problem in the style used on page 3. Testing if a given string is a palindrome (reads the same way forwards and backwards). PUT: Character string =a . . g b h c d f e INPUT: Character string sa 1 a 2 . . . a n . OUTPUT: True if a i = a n +1– i for 1 i n , else False. Find a Hamiltonian cycle (a simple cycle that includes every vertex) in an undirected graph. preorder : a g d c b h f e postorder: d c g b f e h a inorder: d g c a b f e INPUT: An undirected graph G =( V , E ) with n vertices. OUTPUT: A list of vertices u 1 , u 2 , . . . , u n where u i V for all i , u i u
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 2

introex - Engineering Exercises 1. For each of the...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online