0% found this document useful (0 votes)
35 views1 page

ES 102 - Introduction To Computing Lab Assignment - 6: November 6, 2015

This document outlines a lab assignment for an introductory computing course. The assignment involves writing programs to: 1) perform linear and binary searches on a sorted list; 2) shuffle a sorted list into an unsorted list using Knuth's algorithm; 3) search and replace integers in a sorted list; 4) delete integers from a sorted list; 5) implement a randomized binary search and compare its performance to standard binary search; and 6) modify insertion sort using binary search to find insertion positions faster.

Uploaded by

Shyam Kumar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
35 views1 page

ES 102 - Introduction To Computing Lab Assignment - 6: November 6, 2015

This document outlines a lab assignment for an introductory computing course. The assignment involves writing programs to: 1) perform linear and binary searches on a sorted list; 2) shuffle a sorted list into an unsorted list using Knuth's algorithm; 3) search and replace integers in a sorted list; 4) delete integers from a sorted list; 5) implement a randomized binary search and compare its performance to standard binary search; and 6) modify insertion sort using binary search to find insertion positions faster.

Uploaded by

Shyam Kumar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 1

ES 102 - Introduction to Computing

Lab Assignment - 6

November 6, 2015

1. Write a program to perform linear and binary search for a given integer
on a given sorted list of integers.
2. Write a program to take a sorted list as input and generate an unsorted
list using Knuths shuffling.
3. Write a program to search and replace all the occurrences of an integer
with a new integer in a given sorted list. Print the modified list.
4. Write a program to delete all the occurrences of an integer from a
sorted list and create a modified list. Print the modified list.
5. Develop a modified binary search algorithm that uses a random number generator which always generates random numbers in the range
lower and upper. In each instance the random number generated
should take on the role of the middle in the binary search. Compare
the performance of this algorithm with the binary search algorithm in
terms of the number of comparisons made.
6. Design a modified insertion sort algorithm that uses binary search to
speed up the location of the insertion position.

You might also like