Decide which features a user sees
I was asked this
No reports yet. Sign in to say where you were asked it.
Each product feature has an ID, a priority, whether it is behind an A/B test, the locations where it is allowed, and the features it conflicts with. For one user (an ID and a location), decide which features they see.
A feature is eligible when the user's location is allowed and either it has no A/B test or the user falls in the test group (even user IDs). A user can opt in to a feature, which skips the A/B check but not the location check, or opt out, which hides it. Then resolve conflicts: go through eligible features from highest priority down (ties by input order) and keep each one that doesn't conflict with a feature already kept; a conflict listed on either side counts. Return the kept features in input order.
No official answer yet. Write yours on the right and run it.
Nothing published yet.
Sign in to submit your code; every attempt is kept here.
