Al Albayt University

Al Albayt University

<p>Faculty of Information Technology Department of Computer Science Course : DS & FP Final Exam First Semester 2003/2004 Instructor : Raed Almomani Monday 19/1/2004 Student Name : ……………………………………….. Student Number : ……………………………………..</p><p>Information for Candidate: 1. This examination paper contains ( 7 ) questions totaling ( 50 ) marks. 2. The marks for parts of questions are shown in round brackets. Advices to Candidate: 1. Answer all questions. 2. Write your answers clearly. 3. Answer questions in order.</p><p>Question 1: True or False( Marks: 10 ) 1.( ) In any binary search tree, the smallest node is located at the right most of the tree. 2.( ) A stack is sometimes known as FIFO (First input, First Output). 3.( ) All nodes of a tree must have a parent. 4.( ) The { 15 , 10 , 7 , 9 , 2 , 3 , 8 } is a Maximum Heap. 5.( ) Searching for an element in a collision-free hash table is 1 always.</p><p>Question 2: (Hash) ( Marks: 4 ) Given input {4371, 1323, 6173, 4199, 4344, 9679, 1989} and a hash function h(x)=x%10, show the resulting: a. Open hash table? b. Closed hash table using linear probing?</p><p>Question 3: (File Processing) ( Marks: 5 ) Write a C++ program to save ten marks in file named ( GoodBay ). read the marks in the file, compute the average, then append it to the same file?</p><p>Question 4: (File Processing) ( Marks: 5 ) Write a C++ program to count the spaces in a text file named ( seeyou ), Then print it on the screen? Toupper tolower</p><p>1 Question 5: (Hash) ( Marks:6 ) Write a C++ program to sort the charicter array. ( Use selection sorting )</p><p>Question 6: (Sorting) ( Marks: 5 ) Write a C++ program to insert a key into a list to be searched by Quadratic hashing. The hash function is H(x)=x%10? (note: you can define any variable which useful to you function?</p><p>Question 7: (Single Linked List and Sorting) ( Marks: 15 ) Write in C++ a full program to sort a Singly Linked List ( note: the program will process all cases).</p><p>GOOOOOOOOOOOD LUUUUUUUUCCCCCKKKKKK</p><p>2</p>

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    2 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us