Jess: Data Structures, Week 2

The Selection Problem: Suppose you have a group of N numbers and would like to determine the kth largest.

In other words, given two inputs (a group of N numbers and the kth largest number) print out the kth largest value. The kth largest value being whatever number is held at k in the sequence of N numbers.

For example, if the group of N numbers is {3, 7, 5, 9, 4} and k is 2, then the output or kth largest value would be 5 because the number 5 is in the second spot of the sequence.

Show your support

Clapping shows how much you appreciated Jessica Morton’s story.