API Interview Question V2 - Refayat Haque - "Senior Backend Engineer" candidate - Toronto, Ontario, Canada
lambda_function.py
- Backend logic carrying out quote processing based on requests made from client-side (requests to lambda function are in the form of
event
objects/dictionaries) - I.e., the lambda function is what calculates the quote based on the data coming in from the client-side forms
- Backend logic carrying out quote processing based on requests made from client-side (requests to lambda function are in the form of
src/Input.js
- Frontend logic and data capture is done here, frontend logic doing things like ensuring that the user cannot fill out more than one
Pricing
form (e.g., cannot fill out bothStandard Pricing
andStaggered Pricing
)- Other frontend logic example includes blocking out the flat fee discount if the percentage discount is specified, and vice versa, in the
Standard Pricing
form
- Other frontend logic example includes blocking out the flat fee discount if the percentage discount is specified, and vice versa, in the
- Frontend logic and data capture is done here, frontend logic doing things like ensuring that the user cannot fill out more than one
- "The flat fee for storing a single item is $20."
- AWS Lambda (lambda_function.py) has this value assigned to variable
flat_fee
- AWS Lambda (lambda_function.py) has this value assigned to variable
- "Customer A will receive a 10% discount."
- Use either
Standard Pricing
orStaggered Pricing
and submit form with % discount and number of items
- Use either
- "Customer B stores large items, and will be charged at $1 per square foot."
- Use either
Standard Pricing
orStaggered Pricing
and submit form with number of items andSq. ft. - Area occupied by large and/or fragile item(s)
and$ - Cost per sq. ft.
- Use either
- "Customer C is to be charged 5% of the value of the item being stored."
- Use
Value-Based Pricing
and submit form with% of item(s) value as storage fee
andTotal value of item(s)
- Use
- "Client D would like a 5% discount for the first 100 items stored, 10% discount for the next 100, and 15% when they store over 200 items, and be charged at $2 per square foot."
- Use
Staggered Pricing
and submit form withSq. ft. - Area occupied by large and/or fragile item(s)
and$ - Cost per sq. ft.
- Use
- "For example, another customer could receive a flat $200 discount when their monthly bill reaches $400."
- Use
Standard Pricing
and submit form withDiscount on monthly storage fee (flat)
,Conditional discount trigger
andTotal number of items stored
- Use