All puzzles › Marketing

Marketing Practice Problems

20 puzzles (7 easy, 11 medium, 2 hard), 2 free, in Python, JavaScript and C++.

Funnels, conversion rates and campaign data as code.

The puzzles, easiest first

  1. Best Campaign (Easy): Given an array of campaign profits, return the INDEX of the most profitable one, not the profit itself.
  2. Cart Total with Tax (Easy): Given [subtotal, taxPercent], return the total with tax, rounded to a whole number.
  3. Churn Rate (Easy): Given how many subscribers you started the month with and how many you lost, return the churn rate as a percentage, rounded to 1 decimal.
  4. Click-Through Rate (Easy): Given [impressions, clicks], return the click-through rate as a percentage, rounded to a whole number.
  5. Conversion Rate (Easy): Given [visitors, buyers], return the percentage of visitors who bought, rounded to the nearest whole number.
  6. Return on Investment (Easy): Given gain and cost, return the return on investment as a percentage, rounded to 1 decimal.
  7. Total Revenue (Easy): Given an array of sale amounts, return the total.
  8. Pay What the Next Bidder Offered (Medium, free): When you search, an auction decides which ads appear, and it finishes before the page loads.
  9. Who Came Back? (Medium, free): Total active users can rise while a product quietly loses everyone who tries it.
  10. A/B Test Winner (Medium): Given two pages as [visits, signups], return which one converts better (0 or 1), or -1 if they tie.
  11. Above-Average Spenders (Medium): Given an array of customer spending, return how many customers spent more than the average.
  12. Average Order Value (Medium): Given an array of order totals, return the average, rounded.
  13. Customer Lifetime Value (Medium): Given the average order value, orders per year, and how many years a customer sticks around, return their lifetime value, rounded to 2 decimals.
  14. Dedupe Email List (Medium): Given a list of email addresses, remove the duplicates and keep the rest in their original order.
  15. Funnel Drop-off (Medium): Given how many people reach each stage of a funnel, return the biggest drop between two stages in a row.
  16. Growth Rate (Medium): Given [oldValue, newValue], return the percentage change, rounded to a whole number.
  17. Repeat Customers (Medium): Given a list of orders, each naming a customer, return how many customers ordered more than once.
  18. Top-K Spenders (Medium): Given each customer's total spending and a number k, return the k biggest totals, largest first.
  19. Longest Growth Streak (Hard): Given daily revenue, return the most days in a row that revenue went up from the day before.
  20. Max Campaigns in Budget (Hard): Given campaign costs and a budget, return the most campaigns you can afford.

Practice another pattern

Or browse by subject

Browse all 676 puzzles