S04-exam1

S04-exam1 - ECE368 Midterm 1 Spring 2004 Monday, February...

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

View Full Document Right Arrow Icon
Page 1 of 9 ECE368 Midterm 1 Spring 2004 Monday, February 21 7:00 – 8:00 pm GRIS 180 Login: ECE368 Code: Read all instructions before beginning the exam This is a closed book examination. No material other than those provided for you are allowed. You need only a pencil and an eraser for this examination. If you use ink, use either black or blue ink. WRITE NEATLY and indent code where possible. This examination contains an amount of material that a well-prepared student should be able to complete in well under one hour. This examination is worth a total of 100 points. Not all questions are worth the same amount. Plan your time accordingly. You may leave after you have turned in all pages of the examination booklet. You will not be able to change any answers after turning your examination booklet in. Read each question carefully and do only what is specifically asked for in that problem. Some problems require several steps. Show all your work. Partial credit can only be rewarded to work shown. If it helps to explain, draw pictures. Page 2 is a reference sheet of primitive operations for many data structures. Do not attempt to look at other student’s work. Keep your answers to yourself. Any violation will be considered academic dishonesty. Write your 4-digit ECE368 code on EVERY page where indicated. Any page without a code will receive a zero for the material on that page. Read and sign the statement below. Wait for instructions to start the examination before continuing to the next page. “I signify that the work shown in the examination booklet is my own and that I have not received any assistance from other students nor given any assistance to other students.” ____________________________ ( S i g n a t u r e ) Submission Serial # ______
Background image of page 1

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

View Full DocumentRight Arrow Icon
ECE368 Midterm1 Page 2 of 9 For grading purposes only… PART INSTRUCTOR VERIFICATION POINTS SCORE ABET 1 10 none 2 10 none 3 20 4 15 II 5 15 none 6 15 7 15 III TOTAL Primitive Operations for various data structures Stacks: z Push: add items on top of stack z Pop: get item on top of stack and remove it z Stacktop: get top item without removing it z Empty: indicates whether a stack is empty (true/false) Queues: z Remove: get item from the front z Insert: add item at the end (rear) z Empty: indicates whether queue is empty (true/false) Lists: z Empty: return true/false z First: link to first (head) node z Last: link to last (tail) node z Info: returns item in specified node z Next: returns link to node after specified node z RemAfter: removes node after specified node or first node if null is specified; returns removed item z InsAfter: inserts specified node after specified node or at the front of list if no node (=“null”) is specified; returns link to inserted node Trees: z Empty: return true/false z Info: returns item in specified node z Left_Child: returns link to left node of specified node z Right_Child: returns link to right node of specified node z Parent: returns link to parent node of specified node z Create(name, Left, Right): creates a new node, name, with Left and Right links as specified
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/28/2012 for the course ECE 368 taught by Professor Staff during the Fall '08 term at Purdue.

Page1 / 9

S04-exam1 - ECE368 Midterm 1 Spring 2004 Monday, February...

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

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