WYSE Academic Challenge 2002 Computer Science Test (Sectional) SOLUTION
|
|
- Frederica Ross
- 6 years ago
- Views:
Transcription
1 Computer Science - 1 WYSE Academic Challenge 2002 Computer Science Test (Sectional) SOLUTION 1. Access to moving head disks requires three periods of delay before information is brought into memory. The response that correctly list the three time delays in the order in which they occur is a. latency time, seek time, transmission time b. transmission time, latency time, seek time c. seek time, latency time, transmission time d. latency time, transmission time, seek time e. none of the above Disk access involve 3 time periods occurring in the following order: 1. Move the read/write head to the proper track (seek) 2. Wait for the disk to rotate so that the read/write head will be at the correct location on a track (i.e., at the beginning of the data block) (rotational delay or latency) 3. Actual transmission of data Answer C 2. Two computers that communicate with each other use a simple odd parity check to detect errors for ASCII transmission. Which of the following event will always lead to an undetected error in a byte? a. Any even number of bits are inverted b. Any odd number of bits are inverted c. All the 1s are changed to 0s d. All the 0s are changed to 1s When an even number of bits in a byte are inverted, the parity of the byte does not change. As a result, these Type of errors cannot be detected with a simple odd parity check. Answer A. 3. The ASCII code for the character E is What is the ASCII code for the character F? a b c d The ASCII code for F is 1 greater than the ASCII code for E = Answer B
2 Computer Science What application is best handled in ROM? a. storage for temporary variables b. storage for protected passwords c. storage for application programs d. storage for the operating system s boot sector Read-Only Memory (ROM) are small, permanent storage device that stores, among other thing, the booting instructions. Answer D. 5. If an instruction requires 3 cycles and takes 15 nanoseconds to execute, what is the clock speed of the processor? a. 500 MHz b. 200 MHz c. 400 MHz d. 450 MHz Since 3 cycles requires 15 nanoseconds, each cycle requires 5 nanoseconds. Clock speed is 1000/5 = 200 MHz. Answer B 6. The largest integer that can be stored as a 32-bit unsigned binary number is closest to a. 2 millions b. 4 billions c. 6 millions d. 1 billion An unsigned 32-bit integer uses all 32 bits to store the value. The largest is = = 4* Since 2 30 is about 1 billion. The largest number is around 4 billions. Answer B. 7. The total number of positive even integers that can be stored by 8-bit unsigned word is a. 127 b. 128 c. 255 d. 256 An 8-bit unsigned integer has a value between 0 (000 0) and = 255 ( ). Among them, there are 127 even numbers. Answer A
3 Computer Science The decimal integer 61 stored in 8-bit, 2 s-complement form is a b c d = s compliment 61 = ( ) 2 s complement - 62 = (1 s compliment+1) Answer C. 9. The difference of the two hexadecimal numbers 91 and 12 is the binary number a. 79 b c d In hexadecimal, = 7F (F+1 = 10 ) 7F in binary is , Answer C 10. Which of the following is equivalent to the Boolean expression (A AND B) OR (A AND (NOT B))? a. A b. B c. A OR B d. NOT B A B A AND B A AND (NOT B) (A AND B) OR (A AND (NOT B)) The truth table shows that A and (A AND B) OR (A AND (NOT B)) have the same values for all combination of A and B.
4 Computer Science The 2 s complement number system is considered better than 1 s complement system because a. Two is better than 1. b. There are more positive numbers in 2 s complement system than 1 s complement system c. There are more negative numbers in 2 s complement system than 1 s complement system d. A 1's complement system has a positive zero and a negative zero. 1 s compliment system has a positive zero ( ) and a negative zero ( ) 2 s compliment has only one zero ( ). Having 1 representation for 0 is certainly better than having 2. Answer D. 12. In object-oriented design, the combination of data and operations on the data describes a. Member functions b. Methods c. Member elements d. Objects In OO design, an object is a combination of data and operations on the data (called methods). Answer D. 13. The following program segment calculates: X = 1 Y = 5 N = 3 While (N >= 1) X = X * Y N = N - 1 End While a. Y X b. Y N c. N y d. X Y The while loop repeats N time (from N to 1). IN each iteration, we another Y is multiplied to X (which begins at 1). Overall, N Ys, or Y N are multiplied to X. Answer B. 14. Examine the following code segment where all variables are Boolean. While ((NoExchange or last) and (Not flag)) loop body End While Given that the variables in the loop condition are properly initialized so that the loop body executes at least once, what set of conditions will NOT cause the loop to terminate?
5 Computer Science - 5 a. NoExchange = False last = true flag = true b. NoExchage = true last = false flag = false c. NoExchange = false last = false flag = false d. Two of the above Only B will set the WHILE condition to True and will NOT cause the loop to terminate. 15. How many times is the word Hello written to the screen when the following code is executed? For K From 3 To 5 For J from 1 To 4 Print( Hello ); a. 18 b. 15 c. 10 d. 12 The K loop repeats 3 time (3, 4, 5) The J loop repeats 4 times (1,2,3,4) Since J loop is inside of K loop, the total number of iteration is 3*4=12. Answer D. 16. Given the array A[1..6] = 1, 2, 3, 4, 5, 6, what would be the contents of the array A after the following code executes? For I From 3 to 6 A[I] = A[I-1]+A[I-2] a. 1,2,4,8,16,32 b. 1,2,3,4,5,6 c. 1,2,3,5,7,9 d. 1,2,3,5,8,13 Here is how the array changes after each iteration: A[1] A[2] A[3] A[4] A[5] A[6] Initial I = I = I = I = Answer D.
6 Computer Science What value is stored in A after the function call A = F(100)? Function F(N) Count = 0 K = 2 While (K<N) While (N MOD K = 0) N = N DIV K Count = Count + 1 EndWhile K = K + 1 EndWhile Return(Count) EndFunction a. 2 b. 4 c. 6 d. 99 The argument N is initialized to 100 and changed 4 times: DIV 2 = DIV 2 = DIV 5 = 5 5 DIV 5 = 1 The count variable counts the number of time that N changed. It returns 4 (B) 18. Assuming A[1..N], what value will be stored in the variable Result after the following code executes? Result=1 For Index From 2 To N If (A[Index] < A[Result]) Then Result = index EndIf a. the value of the largest element in the array A b. the index of the largest element in the array A c. the index of the smallest element in the array A d. the value of the smallest element in the array A Result is set to index whenever the value at index is smaller than the one at result. When the loop terminates, result contains C.
7 Computer Science What is the value of A after the following code executes? A=0; For K From 3 To 5 A = A + F(K) Function F(B) If (B Mod 2 > 0) Then Return B Else Return (0 - B) EndIf EndFunction a. 4 b. 8 c. 12 d. 16 A = F(3)+F(4)+F(5) = 3 + (-4) + 5 = 4 Answer A 20. Given the array A[1..5] = 3, 2, 5, 1, 4, what would be the contents of the array A after the following code executes? J = 1 For K From 2 To 5 If (A[K] > A[J]) Then J = K EndIf K = 5 Temp = A[K] A[K] = A[J] A[J] = Temp a. 3, 2, 1, 4, 5 b. 3, 2, 1, 5, 4 c. 3, 2, 4, 1, 5 d. 1, 2, 3, 4, 5 At the end of For loop, J contains the index of the largest element in the array, which is 3 Swapping A[3] (containing 5) and A[5] (containing 4), we get a array: 3, 2, 4, 1, 5 Answer C
8 Computer Science What is the value of A after the following code executes? A = 0 For J from 1 To 10 If (J MOD 2 > 0) Then A = A + J EndIf a. 11 b. 15 c. 25 d. 55 A gets the sum of all odd numbers between 1 and 10. In other words, A = = 25 Answer C. 22. Given the hash function: H(N) = N MOD 19 If linear probing is used and seven integer data items are stored in the hash table in the following order: How many collisions occurred? a. 3 b. 4 c. 5 d. 6 The following illustrate how and where each number is stored 65 arrives, hash value = 65 MOD 19 = 8, Store it in table[8], no collision 8 arrives, hash value = 8 MOD 19 = 8, since table[8] is already occupied, using linear probing, store it in the next available cell, table[9] collision 361 arrives, hash value = 361 MOD 19 = 0, store it in table[0], no collision 20 arrives, hash value = 20 MOD 19 = 1, Store it in table[1], no collision 19 arrives, hash value = 19 MOD 19 = 0, since table[0] is already occupied, using linear probing, store it in the next available cell, table[1] collision 38 arrives, hash value = 38 MOD 19 = 0, since table[0] is already occupied, using linear probing, store it in the next available cell, table[2] collision 27 arrives, hash value = 27 MOD 19 = 8, since table[8] is already occupied, using linear probing, store it in the next available cell, table[10] collision Total number of collision: 4, answer B.
9 Computer Science If the root of a binary tree is considered at level 1, then the maximum number of nodes at level 3 of a binary tree is a. 2 b. 3 c. 4 d. 5 level 1: 1 node level 2: at most 2 nodes level 3: at most 4 nodes. Answer C. 24. A Post-order traversal of the binary tree below would result in what sequence? a. 5, 6, 3, 7, 4, 2 b. 5, 3, 6, 2, 4, 7 c. 2, 3, 5, 6, 4, 7 d. 2, 3, 4, 5, 6, 7 A Recursively, Post-order traversal visit the nodes in the order of: Left sub-tree, Root, right sub-tree Answer A. 25. The tree in the previous question is called a(n) a. Expression tree b. Min Heap c. Search tree d. Complete binary tree In the above tree, the value stored at any node is less than the values stored in any of its child nodes. A is incorrect because there is no operator in the tree B is incorrect because leaf nodes of a heap must be in the left most position. In other words, 7 must a left child of 4 for the tree to be a heap C is incorrect since a search tree requires that the left child has value smaller than its parent node.
10 Computer Science - 10 D. is incorrect since node 4 does not have a left child. Answer E. 26. The expression (A+B)*C/(D*(E-F)) written in reverse polish notation is a. AB+C*DEF-*/ b. ABC+*DEF-/* c. ABCD**+EF-/ d. ABC*D+DEF-/* The following describe how the postfix (or reverse polish) expression is created: A AB AB+ AB+C AB+C* AB+C*D AB+C*DE AB+C*DEF AB+C*DEF- AB+C*DEF-* AB+C*DEF-*/ Answer A. 27. In a complete binary tree of 31 nodes, what is the maximum distance between any two nodes? Assume each edge in the path counts as 1. a. 4 b. 5 c. 8 d. 10 e. 30 A complete binary tree of 31 nodes has 5 levels: Level # of nodes the leftmost leaf node and the rightmost leaf nodes are furthest apart. The distance = distance between leftmost leaf and root + distance between root and rightmost = 4+4 = 8 Answer C 28. Which of the following is not a proper postfix notation? a. ABCDE++++ b. ABC***EF/ c. AB+C+D+E+ d. ABC++DEF+++ In a proper postfix expression, as we scan from left to right, at no time will the Number of operands be less than or equal to the number of operators. B is not proper since the part ABC*** has equal number of operands as operators. Answer B.
11 Computer Science Which of the following programming tasks does NOT require a stack? a. Implementation and simulation of recursion b. Simulation of waiting line c. Converting an expression to reverse polish notation d. Evaluation of arithmetic expression Simulation of waiting line requires queue which is First In First Out, not stack. Answer B 30. Given the array A[1..6] = 44, 66, 11, 33, 99, 77, what would be the contents of the array A after the first pass of Straight Selection Sort (or jump down sort)? a. 11, 33, 44, 66, 77, 99 b. 44, 66, 11, 33, 77, 99 c. 11, 44, 66, 33, 99, 77 d. 44, 11, 33, 66, 77, 99 The logic behind a straight selection sort is: For Counter = 1 to Length Find minimum in List[Counter]... List[Length] Swap minimum with List[Counter] After the 1 st path, the smallest value is found (11 in A[3]) and swap with A[1], resulting in the array: 11, 66, 44, 33, 99, 77 Answer E
1996 ILLINOIS JETS TEAMS DISTRICT COMPUTER FUNDAMENTALS TEST. 1. A computer program is:
1996 ILLINOIS JETS TEAMS DISTRICT COMPUTER FUNDAMENTALS TEST 1. A computer program is: a. a sequence of binary machine instructions b. a sequence of operations to carry out a defined task c. a set of computer
More informationGroups of two-state devices are used to represent data in a computer. In general, we say the states are either: high/low, on/off, 1/0,...
Chapter 9 Computer Arithmetic Reading: Section 9.1 on pp. 290-296 Computer Representation of Data Groups of two-state devices are used to represent data in a computer. In general, we say the states are
More informationSection 5.5. Left subtree The left subtree of a vertex V on a binary tree is the graph formed by the left child L of V, the descendents
Section 5.5 Binary Tree A binary tree is a rooted tree in which each vertex has at most two children and each child is designated as being a left child or a right child. Thus, in a binary tree, each vertex
More information2001 Academic Challenge
Worldwide Youth in Science and Engineering 2001 cademic Challenge COMPUTER SCIENCE TEST - SECTIONL GENERL DIRECTIONS Computer Science Test Production Team Fred Hanzelin (retired), South Suburban College
More informationBirkbeck (University of London) Department of Computer Science and Information Systems. Introduction to Computer Systems (BUCI008H4)
Birkbeck (University of London) Department of Computer Science and Information Systems Introduction to Computer Systems (BUCI008H4) CREDIT VALUE: none Spring 2017 Mock Examination Date: Tuesday 14th March
More information2001 Academic Challenge
Worldwide Youth in Science and Engineering 2001 Academic Challenge COMPUTER SCIENCE TEST - STATE FINALS Computer Science Test Production Team Fred Hanzelin (retired), South Suburban College Coordinator/Co-author
More informationUNIT 7A Data Representation: Numbers and Text. Digital Data
UNIT 7A Data Representation: Numbers and Text 1 Digital Data 10010101011110101010110101001110 What does this binary sequence represent? It could be: an integer a floating point number text encoded with
More information5. The result of dividing the 8 bit value by the 8 bit value is:
1. The first generation of electronic computers in the 1950's used memory technology based on a. large scale integrated circuits b. medium scale integrated circuits c. transistors d. vacuum tubes e. toroidal
More informationUser. Application program. Interfaces. Operating system. Hardware
Operating Systems Introduction to Operating Systems and Computer Hardware Introduction and Overview The operating system is a set of system software routines that interface between an application program
More informationModule 2: Classical Algorithm Design Techniques
Module 2: Classical Algorithm Design Techniques Dr. Natarajan Meghanathan Associate Professor of Computer Science Jackson State University Jackson, MS 39217 E-mail: natarajan.meghanathan@jsums.edu Module
More information15110 PRINCIPLES OF COMPUTING SAMPLE EXAM 2
15110 PRINCIPLES OF COMPUTING SAMPLE EXAM 2 Name Section Directions: Answer each question neatly in the space provided. Please read each question carefully. You have 50 minutes for this exam. No electronic
More informationBirkbeck (University of London) Department of Computer Science and Information Systems. Introduction to Computer Systems (BUCI008H4)
Birkbeck (University of London) Department of Computer Science and Information Systems Introduction to Computer Systems (BUCI008H4) CREDIT VALUE: none Spring 2017 Mock Examination SUMMARY ANSWERS Date:
More informationCSL 201 Data Structures Mid-Semester Exam minutes
CL 201 Data tructures Mid-emester Exam - 120 minutes Name: Roll Number: Please read the following instructions carefully This is a closed book, closed notes exam. Calculators are allowed. However laptops
More informationDATA STRUCTURE : A MCQ QUESTION SET Code : RBMCQ0305
Q.1 If h is any hashing function and is used to hash n keys in to a table of size m, where n
More informationMID TERM MEGA FILE SOLVED BY VU HELPER Which one of the following statement is NOT correct.
MID TERM MEGA FILE SOLVED BY VU HELPER Which one of the following statement is NOT correct. In linked list the elements are necessarily to be contiguous In linked list the elements may locate at far positions
More information1993 Illinois JETS TEAMS District Computer Fundamentals Test. 1. What is the decimal value of the sum of the two unsigned binary values: ?
1. What is the decimal value of the sum of the two unsigned binary values: 1101 + 1001? a. 6 b. 12 c. 22 d. 1024 e. 10,110 2. What is the decimal value of the binary number 1101.101b? a. 13.202 b. 13.250
More informationChapter 10 Error Detection and Correction. Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Chapter 10 Error Detection and Correction 0. Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Note The Hamming distance between two words is the number of differences
More informationCSE 332 Winter 2015: Midterm Exam (closed book, closed notes, no calculators)
_ UWNetID: Lecture Section: A CSE 332 Winter 2015: Midterm Exam (closed book, closed notes, no calculators) Instructions: Read the directions for each question carefully before answering. We will give
More informationFORTH SEMESTER DIPLOMA EXAMINATION IN ENGINEERING/ TECHNOLIGY- OCTOBER, 2012 DATA STRUCTURE
TED (10)-3071 Reg. No.. (REVISION-2010) Signature. FORTH SEMESTER DIPLOMA EXAMINATION IN ENGINEERING/ TECHNOLIGY- OCTOBER, 2012 DATA STRUCTURE (Common to CT and IF) [Time: 3 hours (Maximum marks: 100)
More informationAPJ ABDUL KALAM TECHNOLOGICAL UNIVERSITY THIRD SEMESTER B.TECH DEGREE EXAMINATION, JULY 2017 CS205: DATA STRUCTURES (CS, IT)
D B3D042 Pages: 2 Reg. No. Name: APJ ABDUL KALAM TECHNOLOGICAL UNIVERSITY THIRD SEMESTER B.TECH DEGREE EXAMINATION, JULY 2017 Max. Marks: 100 CS205: DATA STRUCTURES (CS, IT) PART A Answer all questions.
More information1. Which of the following Boolean operations produces the output 1 for the fewest number of input patterns?
This is full of Test bank for Computer Science An Overview 12th Edition by Brookshear SM https://getbooksolutions.com/download/computer-science-an-overview-12th-editionby-brookshear-sm Test Bank Chapter
More informationFINALTERM EXAMINATION Fall 2009 CS301- Data Structures Question No: 1 ( Marks: 1 ) - Please choose one The data of the problem is of 2GB and the hard
FINALTERM EXAMINATION Fall 2009 CS301- Data Structures Question No: 1 The data of the problem is of 2GB and the hard disk is of 1GB capacity, to solve this problem we should Use better data structures
More informationPriority queues. Priority queues. Priority queue operations
Priority queues March 30, 018 1 Priority queues The ADT priority queue stores arbitrary objects with priorities. An object with the highest priority gets served first. Objects with priorities are defined
More informationSummer Final Exam Review Session August 5, 2009
15-111 Summer 2 2009 Final Exam Review Session August 5, 2009 Exam Notes The exam is from 10:30 to 1:30 PM in Wean Hall 5419A. The exam will be primarily conceptual. The major emphasis is on understanding
More informationVisit ::: Original Website For Placement Papers. ::: Data Structure
Data Structure 1. What is data structure? A data structure is a way of organizing data that considers not only the items stored, but also their relationship to each other. Advance knowledge about the relationship
More informationN.B. These pastpapers may rely on the knowledge gained from the previous chapters.
N.B. These pastpapers may rely on the knowledge gained from the previous chapters. 1 SEC 94-PAPER 1-Q3B Briefly explain the purpose of the PROGRAM COUNTER 2 SEC 94-PAPER 2A-Q4 (a) Why is a 16-bit 60 MHz
More informationCS2223: Algorithms Sorting Algorithms, Heap Sort, Linear-time sort, Median and Order Statistics
CS2223: Algorithms Sorting Algorithms, Heap Sort, Linear-time sort, Median and Order Statistics 1 Sorting 1.1 Problem Statement You are given a sequence of n numbers < a 1, a 2,..., a n >. You need to
More informationFormal Languages and Automata Theory, SS Project (due Week 14)
Formal Languages and Automata Theory, SS 2018. Project (due Week 14) 1 Preliminaries The objective is to implement an algorithm for the evaluation of an arithmetic expression. As input, we have a string
More informationFinal Examination CSE 100 UCSD (Practice)
Final Examination UCSD (Practice) RULES: 1. Don t start the exam until the instructor says to. 2. This is a closed-book, closed-notes, no-calculator exam. Don t refer to any materials other than the exam
More informationCS251-SE1. Midterm 2. Tuesday 11/1 8:00pm 9:00pm. There are 16 multiple-choice questions and 6 essay questions.
CS251-SE1 Midterm 2 Tuesday 11/1 8:00pm 9:00pm There are 16 multiple-choice questions and 6 essay questions. Answer the multiple choice questions on your bubble sheet. Answer the essay questions in the
More informationBINARY SYSTEM. Binary system is used in digital systems because it is:
CHAPTER 2 CHAPTER CONTENTS 2.1 Binary System 2.2 Binary Arithmetic Operation 2.3 Signed & Unsigned Numbers 2.4 Arithmetic Operations of Signed Numbers 2.5 Hexadecimal Number System 2.6 Octal Number System
More informationWYSE Academic Challenge Computer Fundamentals Test (State Finals)
WYSE Academic Challenge Computer Fundamentals Test (State Finals) - 1998 1. What is the decimal value for the result of the addition of the binary values: 1111 + 0101? (Assume a 4 bit, 2's complement representation.)
More informationINSTITUTE OF AERONAUTICAL ENGINEERING
INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad - 500 043 COMPUTER SCIENCE AND ENGINEERING TUTORIAL QUESTION BANK Course Name Course Code Class Branch DATA STRUCTURES ACS002 B. Tech
More informationYork University AK/ITEC INTRODUCTION TO DATA STRUCTURES. Final Sample II. Examiner: S. Chen Duration: Three hours
York University AK/ITEC 262 3. INTRODUCTION TO DATA STRUCTURES Final Sample II Examiner: S. Chen Duration: Three hours This exam is closed textbook(s) and closed notes. Use of any electronic device (e.g.
More informationProblem with Scanning an Infix Expression
Operator Notation Consider the infix expression (X Y) + (W U), with parentheses added to make the evaluation order perfectly obvious. This is an arithmetic expression written in standard form, called infix
More informationR10 SET - 1. Code No: R II B. Tech I Semester, Supplementary Examinations, May
Code No: R21051 R10 SET - 1 II B. Tech I Semester, Supplementary Examinations, May - 2012 DATA STRUCTURES (Com. to CSE, IT, ECC ) Time: 3 hours Max Marks: 75 Answer any FIVE Questions All Questions carry
More informationBINARY HEAP cs2420 Introduction to Algorithms and Data Structures Spring 2015
BINARY HEAP cs2420 Introduction to Algorithms and Data Structures Spring 2015 1 administrivia 2 -assignment 10 is due on Thursday -midterm grades out tomorrow 3 last time 4 -a hash table is a general storage
More information1. Which of the following circuits can be used to store one bit of data? A) Encoder B) OR gate C) Flip Flop D) Decoder
MCA Lateral 1. Which of the following circuits can be used to store one bit of data? A) Encoder B) OR gate C) Flip Flop D) Decoder 2. What would be the output of the following C program? main ( ){ int
More information1010 2?= ?= CS 64 Lecture 2 Data Representation. Decimal Numbers: Base 10. Reading: FLD Digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
CS 64 Lecture 2 Data Representation Reading: FLD 1.2-1.4 Decimal Numbers: Base 10 Digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 Example: 3271 = (3x10 3 ) + (2x10 2 ) + (7x10 1 ) + (1x10 0 ) 1010 10?= 1010 2?= 1
More informationCOP 3502 (Computer Science I) Test #3: Data Structures Date: 11/1/2013 VERSION A
COP 3502 (Computer Science I) Test #3: Data Structures Date: 11/1/2013 VERSION A Directions: This is a multiple choice test. Each question is worth 5 points. Please choose the most accurate answer listed.
More informationLecture 2: Number Systems
Lecture 2: Number Systems Syed M. Mahmud, Ph.D ECE Department Wayne State University Original Source: Prof. Russell Tessier of University of Massachusetts Aby George of Wayne State University Contents
More informationMultiple Choice Type Questions
Techno India Batanagar Computer Science and Engineering Model Questions Subject Name: Computer Architecture Subject Code: CS 403 Multiple Choice Type Questions 1. SIMD represents an organization that.
More informationChapter 10 Error Detection and Correction 10.1
Chapter 10 Error Detection and Correction 10.1 10-1 INTRODUCTION some issues related, directly or indirectly, to error detection and correction. Topics discussed in this section: Types of Errors Redundancy
More informationCS350: Data Structures Heaps and Priority Queues
Heaps and Priority Queues James Moscola Department of Engineering & Computer Science York College of Pennsylvania James Moscola Priority Queue An abstract data type of a queue that associates a priority
More information1. Draw general diagram of computer showing different logical components (3)
Tutorial 1 1. Draw general diagram of computer showing different logical components (3) 2. List at least three input devices (1.5) 3. List any three output devices (1.5) 4. Fill the blank cells of the
More informationWYSE Academic Challenge Regional Computer Science 2008 Solution Set
1. Correct answer: C. WYSE Academic Challenge Regional 2008 Solution Set 8 bits are sent at each clock cycle and there are 1,000,000 cycles per second, so 8,000,000 bits per second or 1,000,000 bytes per
More informationECE 2020B Fundamentals of Digital Design Spring problems, 6 pages Exam Two Solutions 26 February 2014
Problem 1 (4 parts, 21 points) Encoders and Pass Gates Part A (8 points) Suppose the circuit below has the following input priority: I 1 > I 3 > I 0 > I 2. Complete the truth table by filling in the input
More informationEEM336 Microprocessors I. Arithmetic and Logic Instructions
EEM336 Microprocessors I Arithmetic and Logic Instructions Introduction We examine the arithmetic and logic instructions. The arithmetic instructions include addition, subtraction, multiplication, division,
More informationP( Hit 2nd ) = P( Hit 2nd Miss 1st )P( Miss 1st ) = (1/15)(15/16) = 1/16. P( Hit 3rd ) = (1/14) * P( Miss 2nd and 1st ) = (1/14)(14/15)(15/16) = 1/16
CODING and INFORMATION We need encodings for data. How many questions must be asked to be certain where the ball is. (cases: avg, worst, best) P( Hit 1st ) = 1/16 P( Hit 2nd ) = P( Hit 2nd Miss 1st )P(
More informationUNIT-II. Part-2: CENTRAL PROCESSING UNIT
Page1 UNIT-II Part-2: CENTRAL PROCESSING UNIT Stack Organization Instruction Formats Addressing Modes Data Transfer And Manipulation Program Control Reduced Instruction Set Computer (RISC) Introduction:
More informationDigital Fundamentals
Digital Fundamentals Tenth Edition Floyd Chapter 2 2009 Pearson Education, Upper 2008 Pearson Saddle River, Education NJ 07458. All Rights Reserved Decimal Numbers The position of each digit in a weighted
More informationA6-R3: DATA STRUCTURE THROUGH C LANGUAGE
A6-R3: DATA STRUCTURE THROUGH C LANGUAGE NOTE: 1. There are TWO PARTS in this Module/Paper. PART ONE contains FOUR questions and PART TWO contains FIVE questions. 2. PART ONE is to be answered in the TEAR-OFF
More informationPriority Queues and Binary Heaps
Yufei Tao ITEE University of Queensland In this lecture, we will learn our first tree data structure called the binary heap which serves as an implementation of the priority queue. Priority Queue A priority
More informationCSE 332 Autumn 2013: Midterm Exam (closed book, closed notes, no calculators)
Name: Email address: Quiz Section: CSE 332 Autumn 2013: Midterm Exam (closed book, closed notes, no calculators) Instructions: Read the directions for each question carefully before answering. We will
More informationWYSE Academic Challenge Computer Science Test (State) 2013 Solution Set
WYSE Academic Challenge Computer Science Test (State) 2013 Solution Set 1. Correct Answer: E 2's complement systems are often used in computing because negating a number involves simple operations in the
More informationBasic Data Structures (Version 7) Name:
Prerequisite Concepts for Analysis of Algorithms Basic Data Structures (Version 7) Name: Email: Concept: mathematics notation 1. log 2 n is: Code: 21481 (A) o(log 10 n) (B) ω(log 10 n) (C) Θ(log 10 n)
More informationDS ata Structures Aptitude
DS ata Structures Aptitude 1. What is data structure? A data structure is a way of organizing data that considers not only the items stored, but also their relationship to each other. Advance knowledge
More informationLecture 6 Sorting and Searching
Lecture 6 Sorting and Searching Sorting takes an unordered collection and makes it an ordered one. 1 2 3 4 5 6 77 42 35 12 101 5 1 2 3 4 5 6 5 12 35 42 77 101 There are many algorithms for sorting a list
More informationComputer Organisation CS303
Computer Organisation CS303 Module Period Assignments 1 Day 1 to Day 6 1. Write a program to evaluate the arithmetic statement: X=(A-B + C * (D * E-F))/G + H*K a. Using a general register computer with
More informationE.G.S. PILLAY ENGINEERING COLLEGE (An Autonomous Institution, Affiliated to Anna University, Chennai) Nagore Post, Nagapattinam , Tamilnadu.
17CA 104DATA STRUCTURES Academic Year : 018-019 Programme : MCA Year / Semester : I / I Question Bank Course Coordinator: Mrs. C.Mallika Course Objectives The student should be able to 1. To understand
More informationSelection, Bubble, Insertion, Merge, Heap, Quick Bucket, Radix
Spring 2010 Review Topics Big O Notation Heaps Sorting Selection, Bubble, Insertion, Merge, Heap, Quick Bucket, Radix Hashtables Tree Balancing: AVL trees and DSW algorithm Graphs: Basic terminology and
More informationMidterm Exam 2B Answer key
Midterm Exam 2B Answer key 15110 Principles of Computing Fall 2015 April 6, 2015 Name: Andrew ID: Lab section: Instructions Answer each question neatly in the space provided. There are 6 questions totaling
More informationCS8391-DATA STRUCTURES QUESTION BANK UNIT I
CS8391-DATA STRUCTURES QUESTION BANK UNIT I 2MARKS 1.Define data structure. The data structure can be defined as the collection of elements and all the possible operations which are required for those
More informationData Structures. Trees. By Dr. Mohammad Ali H. Eljinini. M.A. Eljinini, PhD
Data Structures Trees By Dr. Mohammad Ali H. Eljinini Trees Are collections of items arranged in a tree like data structure (none linear). Items are stored inside units called nodes. However: We can use
More informationDIGITAL ARITHMETIC: OPERATIONS AND CIRCUITS
C H A P T E R 6 DIGITAL ARITHMETIC: OPERATIONS AND CIRCUITS OUTLINE 6- Binary Addition 6-2 Representing Signed Numbers 6-3 Addition in the 2 s- Complement System 6-4 Subtraction in the 2 s- Complement
More informationCS-301 Data Structure. Tariq Hanif
1. The tree data structure is a Linear data structure Non-linear data structure Graphical data structure Data structure like queue FINALTERM EXAMINATION Spring 2012 CS301- Data Structure 25-07-2012 2.
More informationBinary Trees and Binary Search Trees
Binary Trees and Binary Search Trees Learning Goals After this unit, you should be able to... Determine if a given tree is an instance of a particular type (e.g. binary, and later heap, etc.) Describe
More informationDecimal & Binary Representation Systems. Decimal & Binary Representation Systems
Decimal & Binary Representation Systems Decimal & binary are positional representation systems each position has a value: d*base i for example: 321 10 = 3*10 2 + 2*10 1 + 1*10 0 for example: 101000001
More information2005 Academic Challenge
2005 Academic Challenge COMPUTER SCIENCE TEST - SECTIONAL Computer Science Test Production Team Sanjay Madria, University of Missouri at Rolla Author/Team Coordinator S. R. Subramanya, University of Missouri
More informationCS301 - Data Structures Glossary By
CS301 - Data Structures Glossary By Abstract Data Type : A set of data values and associated operations that are precisely specified independent of any particular implementation. Also known as ADT Algorithm
More informationR10 SET - 1. Code No: R II B. Tech I Semester, Supplementary Examinations, May
www.jwjobs.net R10 SET - 1 II B. Tech I Semester, Supplementary Examinations, May - 2012 (Com. to CSE, IT, ECC ) Time: 3 hours Max Marks: 75 *******-****** 1. a) Which of the given options provides the
More informationModule Contact: Dr Geoff McKeown, CMP Copyright of the University of East Anglia Version 1
UNIVERSITY OF EAST ANGLIA School of Computing Sciences Main Series UG Examination 2015-16 DATA STRUCTURES AND ALGORITHMS CMP-5014Y Time allowed: 3 hours Section A (Attempt any 4 questions: 60 marks) Section
More informationLargest Online Community of VU Students
WWW.VUPages.com http://forum.vupages.com WWW.VUTUBE.EDU.PK Largest Online Community of VU Students MIDTERM EXAMINATION SEMESTER FALL 2003 CS301-DATA STRUCTURE Total Marks:86 Duration: 60min Instructions
More informationTransform & Conquer. Presorting
Transform & Conquer Definition Transform & Conquer is a general algorithm design technique which works in two stages. STAGE : (Transformation stage): The problem s instance is modified, more amenable to
More informationCHW 261: Logic Design
CHW 261: Logic Design Instructors: Prof. Hala Zayed Dr. Ahmed Shalaby http://www.bu.edu.eg/staff/halazayed14 http://bu.edu.eg/staff/ahmedshalaby14# Slide 1 Slide 2 Slide 3 Digital Fundamentals CHAPTER
More informationProgramming and Data Structure Solved. MCQs- Part 2
Programming and Data Structure Solved MCQs- Part 2 Programming and Data Structure Solved MCQs- Part 2 Unsigned integers occupies Two bytes Four bytes One byte Eight byte A weather forecasting computation
More informationBits, Words, and Integers
Computer Science 52 Bits, Words, and Integers Spring Semester, 2017 In this document, we look at how bits are organized into meaningful data. In particular, we will see the details of how integers are
More informationMultiple-choice (35 pt.)
CS 161 Practice Midterm I Summer 2018 Released: 7/21/18 Multiple-choice (35 pt.) 1. (2 pt.) Which of the following asymptotic bounds describe the function f(n) = n 3? The bounds do not necessarily need
More informationNumber Systems and Their Representations
Number Representations Cptr280 Dr Curtis Nelson Number Systems and Their Representations In this presentation you will learn about: Representation of numbers in computers; Signed vs. unsigned numbers;
More informationSecond Semester - Question Bank Department of Computer Science Advanced Data Structures and Algorithms...
Second Semester - Question Bank Department of Computer Science Advanced Data Structures and Algorithms.... Q1) Let the keys are 28, 47, 20, 36, 43, 23, 25, 54 and table size is 11 then H(28)=28%11=6; H(47)=47%11=3;
More informationSISTEMI EMBEDDED. Basic Concepts about Computers. Federico Baronti Last version:
SISTEMI EMBEDDED Basic Concepts about Computers Federico Baronti Last version: 20170307 Embedded System Block Diagram Embedded Computer Embedded System Input Memory Output Sensor Sensor Sensor SENSOR CONDITIONING
More information8. The use of multiple register windows with overlap causes a reduction in the number of
1. A full binary tree with n leaves contains? 2. The expression 1*2^3*4^5*6 will be evaluated as? 3. The feature in object oriented programming that follows he same operation to be carried out differently,depending
More informationCS301 All Current Final Term Paper Subjective 2013 Solved with refernces
CS301 All Current Final Term Paper Subjective 2013 Solved with refernces Pattren: Total Questions: 52 Total Marks: 80 Total MCQs: 40 (Each of 1 Mark) Total Short Questions: 4 (Each of 2 Mark) Total Short
More informationArithmetic and Bitwise Operations on Binary Data
Arithmetic and Bitwise Operations on Binary Data CSCI 2400: Computer Architecture ECE 3217: Computer Architecture and Organization Instructor: David Ferry Slides adapted from Bryant & O Hallaron s slides
More informationData Structures Question Bank Multiple Choice
Section 1. Fundamentals: Complexity, Algorthm Analysis 1. An algorithm solves A single problem or function Multiple problems or functions Has a single programming language implementation 2. A solution
More informationECE 2020B Fundamentals of Digital Design Spring problems, 6 pages Exam Two 26 February 2014
Instructions: This is a closed book, closed note exam. Calculators are not permitted. If you have a question, raise your hand and I will come to you. Please work the exam in pencil and do not separate
More informationBasic Arithmetic (adding and subtracting)
Basic Arithmetic (adding and subtracting) Digital logic to show add/subtract Boolean algebra abstraction of physical, analog circuit behavior 1 0 CPU components ALU logic circuits logic gates transistors
More informationCSCE f(n) = Θ(g(n)), if f(n) = O(g(n)) and f(n) = Ω(g(n)).
CSCE 3110 Asymptotic Notations Let f and g be functions on real numbers. Then: f(n) = O(g(n)), if there are constants c and n 0 so that f(n) cg(n)), for n n 0. f(n) = Ω(g(n)), if there are constants c
More informationCS 8391 DATA STRUCTURES
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING QUESTION BANK CS 8391 DATA STRUCTURES UNIT- I PART A 1. Define: data structure. A data structure is a way of storing and organizing data in the memory for
More informationTotal No. of Questions :09] [Total No. of Pages : 02. II/IV B.Tech. DEGREE EXAMINATIONS, NOV/DEC First Semester CSE/IT DATA STRUCTURES USING C
CSE/IT 216 (CR) Total No. of Questions :09] [Total No. of Pages : 02 Time: Three Hours 1. a. ADT II/IV B.Tech. DEGREE EXAMINATIONS, NOV/DEC- 2015 First Semester CSE/IT DATA STRUCTURES USING C Answer Question
More informationCS8391-DATA STRUCTURES
ST.JOSEPH COLLEGE OF ENGINEERING DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERI NG CS8391-DATA STRUCTURES QUESTION BANK UNIT I 2MARKS 1.Explain the term data structure. The data structure can be defined
More information1. [1 pt] What is the solution to the recurrence T(n) = 2T(n-1) + 1, T(1) = 1
Asymptotics, Recurrence and Basic Algorithms 1. [1 pt] What is the solution to the recurrence T(n) = 2T(n-1) + 1, T(1) = 1 2. O(n) 2. [1 pt] What is the solution to the recurrence T(n) = T(n/2) + n, T(1)
More information1992 Illinois JETS TEAMS District Computer Fundamentals Test
1 1992 Illinois JETS TEAMS District Computer Fundamentals Test 1. The following pseudocode is an algorithm for finding the smallest of 3 numbers, x, y, and z. Where, if anywhere, is another "end if" needed?
More informationQuestion Bank Subject: Advanced Data Structures Class: SE Computer
Question Bank Subject: Advanced Data Structures Class: SE Computer Question1: Write a non recursive pseudo code for post order traversal of binary tree Answer: Pseudo Code: 1. Push root into Stack_One.
More informationChapter 4. Operations on Data
Chapter 4 Operations on Data 1 OBJECTIVES After reading this chapter, the reader should be able to: List the three categories of operations performed on data. Perform unary and binary logic operations
More informationDATA STRUCTURES/UNIT 3
UNIT III SORTING AND SEARCHING 9 General Background Exchange sorts Selection and Tree Sorting Insertion Sorts Merge and Radix Sorts Basic Search Techniques Tree Searching General Search Trees- Hashing.
More informationCS & IT Conversions. Magnitude 10,000 1,
CS & IT Conversions There are several number systems that you will use when working with computers. These include decimal, binary, octal, and hexadecimal. Knowing how to convert between these number systems
More informationPrevious Year Questions
Previous Year Questions KVS PGT Computer Science 2017 1. Which of the following most accurately describes "multiple inheritances? A. When two classes inherit from each other. B. When a child class has
More informationCSCE 2014 Final Exam Spring Version A
CSCE 2014 Final Exam Spring 2017 Version A Student Name: Student UAID: Instructions: This is a two-hour exam. Students are allowed one 8.5 by 11 page of study notes. Calculators, cell phones and computers
More informationWYSE Academic Challenge Computer Science Test (State) 2015 Solution Set
WYSE Academic Challenge Computer Science Test (State) 2015 Solution Set 1. Correct Answer: E The following shows the contents of the stack (a lifo last in first out structure) after each operation. Instruction
More information