Given a list of options, where various options have dependencies on each other. Given such dependencies and a list of users selection of options, return a list of options which will be left selected.
For example: given 3 options such as premium, gps and screen. Where selecting premium automatically selects gps and screen. Whereas without selecting screen gps option cannot be selected, or deselecting the screen also deselects the GPS.
Now given user selection of gps and then screen should return screen. Whereas selecting screen and then gps returns both of those options.