You are on page 1of 1

Bubble Sort:

Scenario: You are given a list of names of students in a class. The names are stored in an
array, and you need to sort them in alphabetical order using the bubble sort algorithm.
Write a program to implement the bubble sort algorithm and sort the list of names.

Question: Implement the bubble sort algorithm to sort the given array of student names in
alphabetical order. Provide the pseudocode and trace table to demonstrate the sorting
process.

Selection Sort:

Scenario: You are organizing a coding competition and have received a list of participants
with their scores. You need to sort the list in descending order of scores to determine the
winners. Implement the selection sort algorithm to sort the list of scores in descending
order.

Question: Implement the selection sort algorithm to sort the given array of participant
scores in descending order. Provide the pseudocode and trace table to demonstrate the
sorting process.

Binary Search:

Scenario: You are developing a phonebook application and need to implement a search
functionality. The contacts' names are stored in an alphabetically sorted array. Implement
the binary search algorithm to nd a speci c contact's phone number e ciently.

Question: Implement the binary search algorithm to search for a speci c contact's phone
number in the given alphabetically sorted array of contacts' names. Provide the
pseudocode and trace table to demonstrate the search process.

Sequential Search:

Scenario: You are building a library management system, and you need to implement a
search feature to nd books by their ISBN numbers. The library stores book information in
an unsorted array. Implement the sequential search algorithm to nd a speci c book's
details based on its ISBN number.

Question: Implement the sequential search algorithm to search for a speci c book's
details based on its ISBN number in the given unsorted array of books. Provide the
pseudocode and trace table to demonstrate the search process.
fi
fi
fi
fi
fi
ffi
fi
fi

You might also like