Texas Instruments Interview Question

How to sort a list, how to use a mux to implement a logic gate