quiz4-questions - EE 322C Data Structures Spring 2009 Dr....

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

View Full Document Right Arrow Icon
EE 322C Data Structures Spring 2009 Dr. Ramesh Yerraballi Quiz 4 Points : 100 Due Date: Monday 4/6 In class NAME (First, Middle, Last):_______________________________________________ Instructions: Please be specific in your answers. If any of the questions is ambiguous, make reasonable assumptions and document them along with your answers. Please type up or write down your final answers in this word document with prefix “Answer:” after each question. Before you begin , indicate your name above. 1. Give the worst case and best case complexities of the following code snippets using the BigOh notation (in terms of input size marked n). ( 4 + 4 + 6) = 14 points a) for( int i = 0 ; i < 10 ; i++ ) { . . } Answer: b) int[] arr = initialize(); // returns an Integer array of size 'n' for(int i = 0 ; i < arr.length ; i ++) { if(arr[i] >= arr[arr.length]) break; } Answer:
Background image of page 1

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

View Full DocumentRight Arrow Icon
c) int[] arr = initialize(); // returns an Integer array of size 'n' for(int i=0 ; i < arr.length ; i++) { boolean yes = true;
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 09/26/2009 for the course EE 322C taught by Professor Nettles during the Spring '08 term at University of Texas at Austin.

Page1 / 4

quiz4-questions - EE 322C Data Structures Spring 2009 Dr....

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