SlideShare a Scribd company logo
EE693 DATA STRUCTURES AND ALGORITHMS
QUIZ-1 EXAMINATION
16 SEPTEMBER, 2014, Time: 1 Hours
EEE Department, IIT Guwahati
NOTE: Attempt and solve all the questions. Question-1 to Question-20 are multiple choice questions (more than one
choices may be correct). Question-1 to Question-20, marks will be awarded, if and only if, all the correct
choice(s) will be made. Use of any kind of electronic media other than calculators are strictly prohibited. If
anybody finds voiding this rule will be penalized with -10 marks penalty. Please do not forget to mention your
Name and Roll No in the paper sheet. Please tick the correct choice(s). All the questions are of 0.5
mark.
Name: Roll No:
1. This is the welcome question! All the best for EE693 Quiz-1.
There are 25 horses. At most, 5 horses can race together at a time. You must determine the fastest, second fastest,
and third fastest horses. The minimum number of races in which this can be done is
(a) 8 (b) 9 (c) 6 (d) 7
2. Given functions
f1(n) =
log n!
n
, f2(n) =
log n
log log n
,
f3(n) =
log (⌈log n⌉!)
log n
, f4(n) = log log n,
which among the following is correct?
(a) O(f2) ≤ O(f1) ≤ O(f3) ≤ O(f4)
(b) O(f3) ≤ O(f4) ≤ O(f2) ≤ O(f1)
(c) O(f4) ≤ O(f3) ≤ O(f2) ≤ O(f1)
(d) O(f2) ≤ O(f1) ≤ O(f4) ≤ O(f3)
3. Given two arrays, each containing n numbers already in sorted order, the time complexity of the fastest algorithm to
compute the median of all 2n elements is
(a) O(1) (b) O(n) (c) O(
√
n) (d) O(log n)
4. Which of the following sorting algorithms is not stable ?
(a) Merge Sort (b) Quick Sort (c) Counting Sort (d) Radix Sort
5. Solution to the recurrence T(n) = T(1
3
n) + T(2
3
n) + cn is
(a) Ω(n) (b) Ω(n2
) (c) Ω(n3
) (d) Ω(nlog n)
6. Solution to the recurrence T(n) = max0≤q≤n−1(T(q) + T(n − q − 1)) + cn is
(a) Ω(n2
) (b) Ω(nlog2
n) (c) Ω(nlog n) (d) Ω(n)
7. Suppose you flip a fair coin n times. The expected length of the longest streak of consecutive heads is
(a) Θ(n) (b) Θ(1) (c) Θ(log n) (d) Θ(
√
n)
8. What is the least number of comparisons required to find the maximum and minimum of a list of n numbers?
(a) n + ⌈log n⌉ − 2 (b) 3⌊n
2
⌋ (c) 2n − 3 (d) n + ⌊
√
n⌋ − 2
9. Find the worst inputs for Insertion Sort among the following:
(a) A =< 3,5,1,6,2,4 >
(b) A =< 6,4,5,3,1,2 >
(c) A =< 3,1,4,5,6,2 >
(d) A =< 6,4,2,5,3,1 >
10. Find the worst inputs for Merge Sort among the following:
(a) A =< 3,5,1,6,2,4 >
(b) A =< 6,4,5,3,1,2 >
(c) A =< 3,1,4,5,6,2 >
(d) A =< 6,4,2,5,3,1 >
11. Which of the following points is/are true about Linked List data structure when it is compared with array
(a) Arrays have better cache locality that can make them better in terms of performance.
(b) It is easy to insert and delete elements in Linked List.
(c) Random access is not allowed in a typical implementation of Linked Lists.
(d) The size of array has to be pre-decided, linked lists can change their size any time.
12. Which of the following sorting algorithms can be used to sort a random linked list with minimum time complexity?
(a) Insertion Sort (b) Quick Sort (c) Heap Sort (d) Merge Sort
13. In the worst case, the number of comparisons needed to search a singly linked list of length n for a given element is
(a) log2n (b) n
2
(c) log2n − 1 (d) n
14. A circularly linked list is used to represent a Queue. A single variable p is used to access the Queue. To which node
should p point such that both the operations enQueue and deQueue can be performed in constant time?
(a) rear node (b) front node (c) not possible with a single pointer (d) node next to front
15. Let S be a stack of size n >= 1. Starting with the empty stack, suppose we push the first n natural numbers in
sequence, and then perform n pop operations. Assume that Push and Pop operation take X seconds each, and Y
seconds elapse between the end of one such stack operation and the start of the next operation. For m >= 1, define
the stack-life of m as the time elapsed from the end of Push(m) to the start of the pop operation that removes m
from S. The average stack-life of an element of this stack is
(a) n(X+Y) (b) 3Y+2X (c) n(X+Y)-X (d) Y+2X
16. A single array A[1..MAXSIZE] is used to implement two stacks. The two stacks grow from opposite ends of the
array. Variables top1 and top2 (topl<top2) point to the location of the topmost element in each of the stacks. If the
space is to be used efficiently, the condition for "stack full" is
(a) (top1 = MAXSIZE/2) and (top2 = MAXSIZE/2 + 1)
(b) top1 + top2 = MAXSIZE
(c) (top1 = MAXSIZE/2) or (top2 = MAXSIZE)
(d) top1 = top2 − 1
17. How many queues are needed to implement a stack. Consider the situation where no other data structure like arrays,
linked list is available to you.
(a) 1 (b) 2 (c) 3 (d) 4
18. Which of the following operations is not O(1) for an array of sorted data. You may assume that array elements are
distinct.
(a) Find the ith largest element
(b) Delete an element
(c) Find the ith smallest element
(d) All of the above
19. The minimum number of comparisons required to determine if an integer appears more than n/2 times in a sorted
array of n integers is
(a) θ(n) (b) θ(logn) (c) θ(logn2
) (d) θ(n2
)
20. A program P reads in 500 integers in the range (0..100) representing the scores of 500 students. It then prints the
frequency of each score above 50. What would be the best way for P to store the frequencies?
(a) An array of 50 numbers
(b) An array of 100 numbers
(c) An array of 500 numbers
(d) A dynamically allocated array of 550 numbers
All the best for your mid-semester examinations.

More Related Content

What's hot

Mergesort
MergesortMergesort
Mergesort
SimoniShah6
 
OT
OTOT
Lesson 5 interesting properties of complex conjugates p1 2
Lesson 5 interesting properties of complex conjugates p1 2Lesson 5 interesting properties of complex conjugates p1 2
Lesson 5 interesting properties of complex conjugates p1 2
jenniech
 
Data sparse approximation of the Karhunen-Loeve expansion
Data sparse approximation of the Karhunen-Loeve expansionData sparse approximation of the Karhunen-Loeve expansion
Data sparse approximation of the Karhunen-Loeve expansion
Alexander Litvinenko
 
Zero. Probabilystic Foundation of Theoretyical Physics
Zero. Probabilystic Foundation of Theoretyical PhysicsZero. Probabilystic Foundation of Theoretyical Physics
Zero. Probabilystic Foundation of Theoretyical Physics
Gunn Quznetsov
 
[Question Paper] Quantitative Technology (Revised Course) [September / 2013]
[Question Paper] Quantitative Technology (Revised Course) [September / 2013][Question Paper] Quantitative Technology (Revised Course) [September / 2013]
[Question Paper] Quantitative Technology (Revised Course) [September / 2013]
Mumbai B.Sc.IT Study
 
Estimating structured vector autoregressive models
Estimating structured vector autoregressive modelsEstimating structured vector autoregressive models
Estimating structured vector autoregressive models
Akira Tanimoto
 
11 X1 T05 06 Line Through Pt Of Intersection
11 X1 T05 06 Line Through Pt Of Intersection11 X1 T05 06 Line Through Pt Of Intersection
11 X1 T05 06 Line Through Pt Of IntersectionNigel Simmons
 
Radix sort concept
Radix sort conceptRadix sort concept
Radix sort concept
Zeeshan Ali
 
Chapter 6 Matrices in MATLAB
Chapter 6 Matrices in MATLABChapter 6 Matrices in MATLAB
Chapter 6 Matrices in MATLAB
Pranoti Doke
 
Digital Signals and System (October – 2016) [Revised Syllabus | Question Paper]
Digital Signals and System (October  – 2016) [Revised Syllabus | Question Paper]Digital Signals and System (October  – 2016) [Revised Syllabus | Question Paper]
Digital Signals and System (October – 2016) [Revised Syllabus | Question Paper]
Mumbai B.Sc.IT Study
 
Complex exercises
Complex exercisesComplex exercises
Complex exercises
International advisers
 
Digital Signals and System (May – 2016) [Revised Syllabus | Question Paper]
Digital Signals and System (May  – 2016) [Revised Syllabus | Question Paper]Digital Signals and System (May  – 2016) [Revised Syllabus | Question Paper]
Digital Signals and System (May – 2016) [Revised Syllabus | Question Paper]
Mumbai B.Sc.IT Study
 

What's hot (19)

Mergesort
MergesortMergesort
Mergesort
 
Tot d lucas
Tot d lucasTot d lucas
Tot d lucas
 
OT
OTOT
OT
 
Lesson 5 interesting properties of complex conjugates p1 2
Lesson 5 interesting properties of complex conjugates p1 2Lesson 5 interesting properties of complex conjugates p1 2
Lesson 5 interesting properties of complex conjugates p1 2
 
Data sparse approximation of the Karhunen-Loeve expansion
Data sparse approximation of the Karhunen-Loeve expansionData sparse approximation of the Karhunen-Loeve expansion
Data sparse approximation of the Karhunen-Loeve expansion
 
Zero. Probabilystic Foundation of Theoretyical Physics
Zero. Probabilystic Foundation of Theoretyical PhysicsZero. Probabilystic Foundation of Theoretyical Physics
Zero. Probabilystic Foundation of Theoretyical Physics
 
0406 ch 4 day 6
0406 ch 4 day 60406 ch 4 day 6
0406 ch 4 day 6
 
[Question Paper] Quantitative Technology (Revised Course) [September / 2013]
[Question Paper] Quantitative Technology (Revised Course) [September / 2013][Question Paper] Quantitative Technology (Revised Course) [September / 2013]
[Question Paper] Quantitative Technology (Revised Course) [September / 2013]
 
Estimating structured vector autoregressive models
Estimating structured vector autoregressive modelsEstimating structured vector autoregressive models
Estimating structured vector autoregressive models
 
11 X1 T05 06 Line Through Pt Of Intersection
11 X1 T05 06 Line Through Pt Of Intersection11 X1 T05 06 Line Through Pt Of Intersection
11 X1 T05 06 Line Through Pt Of Intersection
 
Radix sort concept
Radix sort conceptRadix sort concept
Radix sort concept
 
0807 ch 8 day 7
0807 ch 8 day 70807 ch 8 day 7
0807 ch 8 day 7
 
Chapter 6 Matrices in MATLAB
Chapter 6 Matrices in MATLABChapter 6 Matrices in MATLAB
Chapter 6 Matrices in MATLAB
 
Digital Signals and System (October – 2016) [Revised Syllabus | Question Paper]
Digital Signals and System (October  – 2016) [Revised Syllabus | Question Paper]Digital Signals and System (October  – 2016) [Revised Syllabus | Question Paper]
Digital Signals and System (October – 2016) [Revised Syllabus | Question Paper]
 
Complex exercises
Complex exercisesComplex exercises
Complex exercises
 
Spsp fw
Spsp fwSpsp fw
Spsp fw
 
Lesson 51
Lesson 51Lesson 51
Lesson 51
 
Digital Signals and System (May – 2016) [Revised Syllabus | Question Paper]
Digital Signals and System (May  – 2016) [Revised Syllabus | Question Paper]Digital Signals and System (May  – 2016) [Revised Syllabus | Question Paper]
Digital Signals and System (May – 2016) [Revised Syllabus | Question Paper]
 
Week 13
Week 13Week 13
Week 13
 

Viewers also liked

Tabla escepticismo y nihilismo
Tabla escepticismo y nihilismoTabla escepticismo y nihilismo
Tabla escepticismo y nihilismo
Bryan Gómez Vásquez
 
Office 2013
Office 2013Office 2013
Office 2013
MarcelAchina
 
What are our clients challenges
What are our clients challengesWhat are our clients challenges
What are our clients challengesMatt Ellis
 
Diapositivas bienestar aprendices
Diapositivas bienestar aprendicesDiapositivas bienestar aprendices
Diapositivas bienestar aprendicesErwin Cepeda
 
Our lady alliance academy final draft script: With Revisions
Our lady alliance academy final draft script: With RevisionsOur lady alliance academy final draft script: With Revisions
Our lady alliance academy final draft script: With Revisions
Tom_Adams
 
Photography and phot imaging
Photography and phot imagingPhotography and phot imaging
Photography and phot imaginghaverstockmedia
 
трансфузија крви 1
трансфузија крви 1трансфузија крви 1
трансфузија крви 1nikolinajankovic
 
Ee693 sept2014quizgt2
Ee693 sept2014quizgt2Ee693 sept2014quizgt2
Ee693 sept2014quizgt2
Gopi Saiteja
 
Summary of Learning
Summary of LearningSummary of Learning
Summary of Learning
Sheri Schlosser
 
Ms excel
Ms excelMs excel
Ms excel
Nurli Adelan
 
Buenos días
Buenos díasBuenos días
Buenos días
Xoch Itl
 
Before quiz 2
Before quiz 2Before quiz 2
Before quiz 2
Gopi Saiteja
 
Ee693 sept2014midsem
Ee693 sept2014midsemEe693 sept2014midsem
Ee693 sept2014midsem
Gopi Saiteja
 
Tema i
Tema iTema i
Tema i
Eli Bj
 
CIS Universidad César vallejo (CAMBIO CLIMÁTICO)
CIS Universidad César vallejo (CAMBIO CLIMÁTICO)CIS Universidad César vallejo (CAMBIO CLIMÁTICO)
CIS Universidad César vallejo (CAMBIO CLIMÁTICO)
alfonso amador dionicio cruz
 

Viewers also liked (20)

Tabla escepticismo y nihilismo
Tabla escepticismo y nihilismoTabla escepticismo y nihilismo
Tabla escepticismo y nihilismo
 
Office 2013
Office 2013Office 2013
Office 2013
 
What are our clients challenges
What are our clients challengesWhat are our clients challenges
What are our clients challenges
 
Diapositivas bienestar aprendices
Diapositivas bienestar aprendicesDiapositivas bienestar aprendices
Diapositivas bienestar aprendices
 
Our lady alliance academy final draft script: With Revisions
Our lady alliance academy final draft script: With RevisionsOur lady alliance academy final draft script: With Revisions
Our lady alliance academy final draft script: With Revisions
 
Photography and phot imaging
Photography and phot imagingPhotography and phot imaging
Photography and phot imaging
 
трансфузија крви 1
трансфузија крви 1трансфузија крви 1
трансфузија крви 1
 
Ee693 sept2014quizgt2
Ee693 sept2014quizgt2Ee693 sept2014quizgt2
Ee693 sept2014quizgt2
 
Documento recuperado 5
Documento recuperado 5Documento recuperado 5
Documento recuperado 5
 
Summary of Learning
Summary of LearningSummary of Learning
Summary of Learning
 
Ms excel
Ms excelMs excel
Ms excel
 
Commercial radio
Commercial radioCommercial radio
Commercial radio
 
RUBÉN. TERREMOTOS
RUBÉN. TERREMOTOSRUBÉN. TERREMOTOS
RUBÉN. TERREMOTOS
 
Varicela zorter virus
Varicela zorter virusVaricela zorter virus
Varicela zorter virus
 
Buenos días
Buenos díasBuenos días
Buenos días
 
Before quiz 2
Before quiz 2Before quiz 2
Before quiz 2
 
Ee693 sept2014midsem
Ee693 sept2014midsemEe693 sept2014midsem
Ee693 sept2014midsem
 
Tema i
Tema iTema i
Tema i
 
CIS Universidad César vallejo (CAMBIO CLIMÁTICO)
CIS Universidad César vallejo (CAMBIO CLIMÁTICO)CIS Universidad César vallejo (CAMBIO CLIMÁTICO)
CIS Universidad César vallejo (CAMBIO CLIMÁTICO)
 
Gaming industry
Gaming industryGaming industry
Gaming industry
 

Similar to Ee693 sept2014quiz1

Answers withexplanations
Answers withexplanationsAnswers withexplanations
Answers withexplanations
Gopi Saiteja
 
Ee693 sept2014quizgt1
Ee693 sept2014quizgt1Ee693 sept2014quizgt1
Ee693 sept2014quizgt1
Gopi Saiteja
 
Cs6402 design and analysis of algorithms may june 2016 answer key
Cs6402 design and analysis of algorithms may june 2016 answer keyCs6402 design and analysis of algorithms may june 2016 answer key
Cs6402 design and analysis of algorithms may june 2016 answer key
appasami
 
Discrete Math IP4 - Automata Theory
Discrete Math IP4 - Automata TheoryDiscrete Math IP4 - Automata Theory
Discrete Math IP4 - Automata Theory
Mark Simon
 
Ee693 questionshomework
Ee693 questionshomeworkEe693 questionshomework
Ee693 questionshomework
Gopi Saiteja
 
Tpr star tree
Tpr star treeTpr star tree
Tpr star treeWin Yu
 
Amcat placement questions
Amcat placement questionsAmcat placement questions
Amcat placement questions
m4maths
 
Paper computer
Paper computerPaper computer
Paper computerbikram ...
 
Paper computer
Paper computerPaper computer
Paper computerbikram ...
 
Insersion & Bubble Sort in Algoritm
Insersion & Bubble Sort in AlgoritmInsersion & Bubble Sort in Algoritm
Insersion & Bubble Sort in Algoritm
Ehsan Ehrari
 
Algorithm Assignment Help
Algorithm Assignment HelpAlgorithm Assignment Help
Algorithm Assignment Help
Programming Homework Help
 
Ip 5 discrete mathematics
Ip 5 discrete mathematicsIp 5 discrete mathematics
Ip 5 discrete mathematics
Mark Simon
 
Sorting
SortingSorting
Sorting
BHARATH KUMAR
 
19. algorithms and-complexity
19. algorithms and-complexity19. algorithms and-complexity
19. algorithms and-complexity
showkat27
 
Nbhm m. a. and m.sc. scholarship test september 20, 2014 with answer key
Nbhm m. a. and m.sc. scholarship test september 20, 2014 with answer keyNbhm m. a. and m.sc. scholarship test september 20, 2014 with answer key
Nbhm m. a. and m.sc. scholarship test september 20, 2014 with answer keyMD Kutubuddin Sardar
 
pradeepbishtLecture13 div conq
pradeepbishtLecture13 div conqpradeepbishtLecture13 div conq
pradeepbishtLecture13 div conq
Pradeep Bisht
 
Classical programming interview questions
Classical programming interview questionsClassical programming interview questions
Classical programming interview questions
Gradeup
 

Similar to Ee693 sept2014quiz1 (20)

Answers withexplanations
Answers withexplanationsAnswers withexplanations
Answers withexplanations
 
Ee693 sept2014quizgt1
Ee693 sept2014quizgt1Ee693 sept2014quizgt1
Ee693 sept2014quizgt1
 
Cs6402 design and analysis of algorithms may june 2016 answer key
Cs6402 design and analysis of algorithms may june 2016 answer keyCs6402 design and analysis of algorithms may june 2016 answer key
Cs6402 design and analysis of algorithms may june 2016 answer key
 
Discrete Math IP4 - Automata Theory
Discrete Math IP4 - Automata TheoryDiscrete Math IP4 - Automata Theory
Discrete Math IP4 - Automata Theory
 
Ee693 questionshomework
Ee693 questionshomeworkEe693 questionshomework
Ee693 questionshomework
 
Tpr star tree
Tpr star treeTpr star tree
Tpr star tree
 
algo1
algo1algo1
algo1
 
Amcat placement questions
Amcat placement questionsAmcat placement questions
Amcat placement questions
 
Paper computer
Paper computerPaper computer
Paper computer
 
Paper computer
Paper computerPaper computer
Paper computer
 
Insersion & Bubble Sort in Algoritm
Insersion & Bubble Sort in AlgoritmInsersion & Bubble Sort in Algoritm
Insersion & Bubble Sort in Algoritm
 
Algorithm Assignment Help
Algorithm Assignment HelpAlgorithm Assignment Help
Algorithm Assignment Help
 
Ip 5 discrete mathematics
Ip 5 discrete mathematicsIp 5 discrete mathematics
Ip 5 discrete mathematics
 
Sorting
SortingSorting
Sorting
 
Q
QQ
Q
 
Slide2
Slide2Slide2
Slide2
 
19. algorithms and-complexity
19. algorithms and-complexity19. algorithms and-complexity
19. algorithms and-complexity
 
Nbhm m. a. and m.sc. scholarship test september 20, 2014 with answer key
Nbhm m. a. and m.sc. scholarship test september 20, 2014 with answer keyNbhm m. a. and m.sc. scholarship test september 20, 2014 with answer key
Nbhm m. a. and m.sc. scholarship test september 20, 2014 with answer key
 
pradeepbishtLecture13 div conq
pradeepbishtLecture13 div conqpradeepbishtLecture13 div conq
pradeepbishtLecture13 div conq
 
Classical programming interview questions
Classical programming interview questionsClassical programming interview questions
Classical programming interview questions
 

More from Gopi Saiteja

Trees gt(1)
Trees gt(1)Trees gt(1)
Trees gt(1)
Gopi Saiteja
 
Topic11 sortingandsearching
Topic11 sortingandsearchingTopic11 sortingandsearching
Topic11 sortingandsearching
Gopi Saiteja
 
Heapsort
HeapsortHeapsort
Heapsort
Gopi Saiteja
 
Hashing gt1
Hashing gt1Hashing gt1
Hashing gt1
Gopi Saiteja
 
Dynamic programming
Dynamic programmingDynamic programming
Dynamic programming
Gopi Saiteja
 
Cs105 l15-bucket radix
Cs105 l15-bucket radixCs105 l15-bucket radix
Cs105 l15-bucket radix
Gopi Saiteja
 
Chapter11 sorting algorithmsefficiency
Chapter11 sorting algorithmsefficiencyChapter11 sorting algorithmsefficiency
Chapter11 sorting algorithmsefficiency
Gopi Saiteja
 
Sorting
SortingSorting
Sorting
Gopi Saiteja
 
Solution(1)
Solution(1)Solution(1)
Solution(1)
Gopi Saiteja
 
Pthread
PthreadPthread
Pthread
Gopi Saiteja
 
Open mp
Open mpOpen mp
Open mp
Gopi Saiteja
 
Introduction
IntroductionIntroduction
Introduction
Gopi Saiteja
 
Cuda
CudaCuda
Vector space interpretation_of_random_variables
Vector space interpretation_of_random_variablesVector space interpretation_of_random_variables
Vector space interpretation_of_random_variables
Gopi Saiteja
 
Statistical signal processing(1)
Statistical signal processing(1)Statistical signal processing(1)
Statistical signal processing(1)
Gopi Saiteja
 
Prob review
Prob reviewProb review
Prob review
Gopi Saiteja
 
Estimationtheory2
Estimationtheory2Estimationtheory2
Estimationtheory2
Gopi Saiteja
 
Estimation theory 1
Estimation theory 1Estimation theory 1
Estimation theory 1
Gopi Saiteja
 
Assignment for practice
Assignment for practiceAssignment for practice
Assignment for practice
Gopi Saiteja
 
After quiz 2
After quiz 2After quiz 2
After quiz 2
Gopi Saiteja
 

More from Gopi Saiteja (20)

Trees gt(1)
Trees gt(1)Trees gt(1)
Trees gt(1)
 
Topic11 sortingandsearching
Topic11 sortingandsearchingTopic11 sortingandsearching
Topic11 sortingandsearching
 
Heapsort
HeapsortHeapsort
Heapsort
 
Hashing gt1
Hashing gt1Hashing gt1
Hashing gt1
 
Dynamic programming
Dynamic programmingDynamic programming
Dynamic programming
 
Cs105 l15-bucket radix
Cs105 l15-bucket radixCs105 l15-bucket radix
Cs105 l15-bucket radix
 
Chapter11 sorting algorithmsefficiency
Chapter11 sorting algorithmsefficiencyChapter11 sorting algorithmsefficiency
Chapter11 sorting algorithmsefficiency
 
Sorting
SortingSorting
Sorting
 
Solution(1)
Solution(1)Solution(1)
Solution(1)
 
Pthread
PthreadPthread
Pthread
 
Open mp
Open mpOpen mp
Open mp
 
Introduction
IntroductionIntroduction
Introduction
 
Cuda
CudaCuda
Cuda
 
Vector space interpretation_of_random_variables
Vector space interpretation_of_random_variablesVector space interpretation_of_random_variables
Vector space interpretation_of_random_variables
 
Statistical signal processing(1)
Statistical signal processing(1)Statistical signal processing(1)
Statistical signal processing(1)
 
Prob review
Prob reviewProb review
Prob review
 
Estimationtheory2
Estimationtheory2Estimationtheory2
Estimationtheory2
 
Estimation theory 1
Estimation theory 1Estimation theory 1
Estimation theory 1
 
Assignment for practice
Assignment for practiceAssignment for practice
Assignment for practice
 
After quiz 2
After quiz 2After quiz 2
After quiz 2
 

Recently uploaded

Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
Kamal Acharya
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
karthi keyan
 
space technology lecture notes on satellite
space technology lecture notes on satellitespace technology lecture notes on satellite
space technology lecture notes on satellite
ongomchris
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
FluxPrime1
 
Runway Orientation Based on the Wind Rose Diagram.pptx
Runway Orientation Based on the Wind Rose Diagram.pptxRunway Orientation Based on the Wind Rose Diagram.pptx
Runway Orientation Based on the Wind Rose Diagram.pptx
SupreethSP4
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
AJAYKUMARPUND1
 
Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
manasideore6
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
fxintegritypublishin
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
thanhdowork
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
MdTanvirMahtab2
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
Jayaprasanna4
 
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdfGoverning Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
WENKENLI1
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
ViniHema
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
Divya Somashekar
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Sreedhar Chowdam
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
ydteq
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
gdsczhcet
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
R&R Consult
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Dr.Costas Sachpazis
 

Recently uploaded (20)

Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
 
space technology lecture notes on satellite
space technology lecture notes on satellitespace technology lecture notes on satellite
space technology lecture notes on satellite
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
 
Runway Orientation Based on the Wind Rose Diagram.pptx
Runway Orientation Based on the Wind Rose Diagram.pptxRunway Orientation Based on the Wind Rose Diagram.pptx
Runway Orientation Based on the Wind Rose Diagram.pptx
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
 
Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
 
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdfGoverning Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
 

Ee693 sept2014quiz1

  • 1. EE693 DATA STRUCTURES AND ALGORITHMS QUIZ-1 EXAMINATION 16 SEPTEMBER, 2014, Time: 1 Hours EEE Department, IIT Guwahati NOTE: Attempt and solve all the questions. Question-1 to Question-20 are multiple choice questions (more than one choices may be correct). Question-1 to Question-20, marks will be awarded, if and only if, all the correct choice(s) will be made. Use of any kind of electronic media other than calculators are strictly prohibited. If anybody finds voiding this rule will be penalized with -10 marks penalty. Please do not forget to mention your Name and Roll No in the paper sheet. Please tick the correct choice(s). All the questions are of 0.5 mark. Name: Roll No: 1. This is the welcome question! All the best for EE693 Quiz-1. There are 25 horses. At most, 5 horses can race together at a time. You must determine the fastest, second fastest, and third fastest horses. The minimum number of races in which this can be done is (a) 8 (b) 9 (c) 6 (d) 7 2. Given functions f1(n) = log n! n , f2(n) = log n log log n , f3(n) = log (⌈log n⌉!) log n , f4(n) = log log n, which among the following is correct? (a) O(f2) ≤ O(f1) ≤ O(f3) ≤ O(f4) (b) O(f3) ≤ O(f4) ≤ O(f2) ≤ O(f1) (c) O(f4) ≤ O(f3) ≤ O(f2) ≤ O(f1) (d) O(f2) ≤ O(f1) ≤ O(f4) ≤ O(f3) 3. Given two arrays, each containing n numbers already in sorted order, the time complexity of the fastest algorithm to compute the median of all 2n elements is (a) O(1) (b) O(n) (c) O( √ n) (d) O(log n) 4. Which of the following sorting algorithms is not stable ? (a) Merge Sort (b) Quick Sort (c) Counting Sort (d) Radix Sort 5. Solution to the recurrence T(n) = T(1 3 n) + T(2 3 n) + cn is (a) Ω(n) (b) Ω(n2 ) (c) Ω(n3 ) (d) Ω(nlog n) 6. Solution to the recurrence T(n) = max0≤q≤n−1(T(q) + T(n − q − 1)) + cn is (a) Ω(n2 ) (b) Ω(nlog2 n) (c) Ω(nlog n) (d) Ω(n) 7. Suppose you flip a fair coin n times. The expected length of the longest streak of consecutive heads is (a) Θ(n) (b) Θ(1) (c) Θ(log n) (d) Θ( √ n) 8. What is the least number of comparisons required to find the maximum and minimum of a list of n numbers? (a) n + ⌈log n⌉ − 2 (b) 3⌊n 2 ⌋ (c) 2n − 3 (d) n + ⌊ √ n⌋ − 2 9. Find the worst inputs for Insertion Sort among the following: (a) A =< 3,5,1,6,2,4 > (b) A =< 6,4,5,3,1,2 > (c) A =< 3,1,4,5,6,2 > (d) A =< 6,4,2,5,3,1 >
  • 2. 10. Find the worst inputs for Merge Sort among the following: (a) A =< 3,5,1,6,2,4 > (b) A =< 6,4,5,3,1,2 > (c) A =< 3,1,4,5,6,2 > (d) A =< 6,4,2,5,3,1 > 11. Which of the following points is/are true about Linked List data structure when it is compared with array (a) Arrays have better cache locality that can make them better in terms of performance. (b) It is easy to insert and delete elements in Linked List. (c) Random access is not allowed in a typical implementation of Linked Lists. (d) The size of array has to be pre-decided, linked lists can change their size any time. 12. Which of the following sorting algorithms can be used to sort a random linked list with minimum time complexity? (a) Insertion Sort (b) Quick Sort (c) Heap Sort (d) Merge Sort 13. In the worst case, the number of comparisons needed to search a singly linked list of length n for a given element is (a) log2n (b) n 2 (c) log2n − 1 (d) n 14. A circularly linked list is used to represent a Queue. A single variable p is used to access the Queue. To which node should p point such that both the operations enQueue and deQueue can be performed in constant time? (a) rear node (b) front node (c) not possible with a single pointer (d) node next to front 15. Let S be a stack of size n >= 1. Starting with the empty stack, suppose we push the first n natural numbers in sequence, and then perform n pop operations. Assume that Push and Pop operation take X seconds each, and Y seconds elapse between the end of one such stack operation and the start of the next operation. For m >= 1, define the stack-life of m as the time elapsed from the end of Push(m) to the start of the pop operation that removes m from S. The average stack-life of an element of this stack is (a) n(X+Y) (b) 3Y+2X (c) n(X+Y)-X (d) Y+2X 16. A single array A[1..MAXSIZE] is used to implement two stacks. The two stacks grow from opposite ends of the array. Variables top1 and top2 (topl<top2) point to the location of the topmost element in each of the stacks. If the space is to be used efficiently, the condition for "stack full" is (a) (top1 = MAXSIZE/2) and (top2 = MAXSIZE/2 + 1) (b) top1 + top2 = MAXSIZE (c) (top1 = MAXSIZE/2) or (top2 = MAXSIZE) (d) top1 = top2 − 1 17. How many queues are needed to implement a stack. Consider the situation where no other data structure like arrays, linked list is available to you. (a) 1 (b) 2 (c) 3 (d) 4 18. Which of the following operations is not O(1) for an array of sorted data. You may assume that array elements are distinct. (a) Find the ith largest element (b) Delete an element (c) Find the ith smallest element (d) All of the above 19. The minimum number of comparisons required to determine if an integer appears more than n/2 times in a sorted array of n integers is (a) θ(n) (b) θ(logn) (c) θ(logn2 ) (d) θ(n2 ) 20. A program P reads in 500 integers in the range (0..100) representing the scores of 500 students. It then prints the frequency of each score above 50. What would be the best way for P to store the frequencies? (a) An array of 50 numbers (b) An array of 100 numbers (c) An array of 500 numbers (d) A dynamically allocated array of 550 numbers All the best for your mid-semester examinations.