Collect sorted distinct integer values
A table of observations is stored as a list of rows. Each row is a list containing integers or Boolean values. Design an algorithm that uses a set to collect every distinct qualifying integer, then returns those integers as a list in ascending order.
Qualifying integers are from 1 through 10, inclusive. Exclude values outside that range and exclude Boolean values. Leave every source row unchanged. Return [] if the table is empty or no values qualify. Rows may have different lengths, including zero.
The input in Listing 1 must produce [1, 3, 6, 10].
Present your algorithm in Python, pseudocode, or a flowchart. If you use Python, name the function sorted_distinct_values(data). You may use sorted(). Give checks with inputs and expected results for repetitions, range boundaries, Boolean values, and empty input.