Skip to content
Debmalya Jash edited this page Nov 27, 2021 · 10 revisions

Welcome to the odysses wiki!

Problem Statement


We will be provided with plans. Example of a sample plan listed below :-

Plan Price Features
PLAN1 100 voice,email
PLAN2 150 email,database,admin
PLAN3 125 voice,admin
PLAN4 135 database,admin

Next we will be asked with a combination of features and the cheapest combination of plans to get all these features. For the feature set email, voice, admin ; cheapest plan is PLAN1,PLAN3 and the price is 225.

Solution

Missing Feature Analysis

  • Check the missing features.
Plan Price Features Missing Features
PLAN1 100 voice,email admin
PLAN2 150 email,database,admin voice
PLAN3 125 voice,admin email
PLAN4 135 database,admin voice,email
  • Find the complimentary plans.
Plan Price Features Missing Features Complimentary Plans
PLAN1 100 voice,email admin PLAN2, PLAN3, PLAN4
PLAN2 150 email,database,admin voice PLAN1, PLAN3
PLAN3 125 voice,admin email PLAN2, PLAN1
PLAN4 135 database,admin voice,email PLAN1, PLAN2 + PLAN3
  • Check the price
Plan Complimentary Plan(s) Price
PLAN1 PLAN2 100 + 150 = 250
PLAN1 PLAN3 100 + 125 = 225
PLAN1 PLAN4 100 + 135 = 235
PLAN2 PLAN3 150 + 125 = 275
PLAN4 PLAN2 + PLAN3 135 + 150 + 125 = 410

Winner is PLAN1 + PLAN3 with price 225

Components

Components

Clone this wiki locally