Vous êtes sur la page 1sur 1

RNSIT – Department of CSE Subject Code: 18CS42 Assignment-II

RNS Institute of Technology


(VTU Affiliated, AICTE Approved, NAAC ‘A’ Grade Accredited)
(UG Programs- CSE, ECE, ISE, EIE & EEE have been Accredited by NBA for the Academic Year 2018-19, 2019-20 &
2020-21)
DR. VISHNUVARDHAN ROAD, CHANNASANDRA, RR NAGAR POST, BENGALURU – 560098

Department of Computer Science and Engineering


(NBA Accredited for the Academic Years 2018-19, 2019-20, 2020-21)

ASSIGNMENT-I
Submission Deadline 14th March 2020

SUBJECT TITLE Design & Analysis of Algorithms

SUBJECT TYPE Core

SUBJECT CODE 18CS42

ACADEMIC YEAR 2020 BATCH 2018-2022

SCHEME CBCS Scheme(Effective from the academic year 2017)

SEMESTER IV A and B Sections


FACULTY NAME and Dr. Bhavanishankar K, Assistant Professor
DESIGNATION Rashmi M, Assistant Professor

Q.
Questions Bloom’s LL COs
No.
Binary search is used to determine a specific element (and its position) in an
ordered sequence of elements. The search is accomplished by dividing the
input array into two parts. Is it possible to divide the input into three parts
1 L5 CO1
and still find the specific element and its position? Design an algorithm to do
the same and Obtain its time complexity. Compare this algorithm with binary
search and write an analysis.
Let’s play the game of guessing the number. Player X will guess number
between 1 and N, Player Y can ask any questions to X. But the player X will
2 answer either Yes or No. But the catch is, player Y must guess the number L6 CO1
in as less attempts as possible. Implement this game of guessing and obtain
the time complexity.
Write an algorithm called Find_Largest(A) that finds the largest number in
3 the array A using a divide-and-conquer strategy. What will be the time L3, L5 CO1
complexity? Justify your complexity analysis.
Searching in sorted linked list takes worst time of O(n). Can we reduce this
4 L3, L4 CO1
using skip lists? Write a note on skip list with an example.
Draw the binary search tree obtained when the keys 1, 2, 3, 4, 5, 6, 7 are
inserted in the given order into an initially empty tree. What is the problem
5 L3, L5 CO1
of the tree you get? Why is it a problem? How could you modify the
insertion algorithm to solve this problem. Justify your answer.

Bloom’s Taxonomy Levels: L1: Remember L2. Understand L3. Apply L4. Analyze
L5. Evaluate L6. Create

Page | 1

Vous aimerez peut-être aussi