All puzzles › Business

Business Practice Problems

21 puzzles (8 easy, 10 medium, 3 hard), 4 free, in Python, JavaScript and C++.

Profit, payroll, inventory and cash-flow turned into puzzles.

The puzzles, easiest first

  1. A Market With No Market Maker (Easy, free): A decentralized exchange has no order book.
  2. Everyone Owes Everyone (Easy, free): Banks owe each other money all day long.
  3. Apply Discount (Easy): Given [price, percentOff], return the price after the discount.
  4. Gross Margin (Easy): Given revenue and the cost of goods sold, return the gross margin as a percentage, rounded to 1 decimal.
  5. Items to Reorder (Easy): Given stock levels and a reorder threshold, return how many products are below the threshold.
  6. Markup Price (Easy): Given [cost, markupPercent], return the selling price, rounded to a whole number.
  7. Net Profit (Easy): Given [revenue, costs], return the profit: revenue minus costs.
  8. Total Payroll (Easy): Given an array of salaries, return the total.
  9. Fill the Order, Cheapest First (Medium, free): A stock exchange keeps an order book of sell offers, each one a price and a number of shares, sorted from cheapest to dearest.
  10. Which Shares Did You Sell? (Medium, free): You bought shares at different prices over time, and now you sell some.
  11. Break-Even Units (Medium): Given [fixedCost, price, unitCost], return how many units you have to sell to cover the fixed cost.
  12. Cash Runway (Medium): Given [cash, monthlyBurn], return how many full months the cash will last.
  13. Compound Interest (Medium): Given a starting amount, a yearly rate as a decimal, and a number of years, return the final amount, rounded to 2 decimals.
  14. Inventory Value (Medium): Given two arrays that line up, quantities and prices, return the total value of the stock.
  15. Lowest Cash Balance (Medium): Given a list of deposits and withdrawals, starting from a balance of 0, return the lowest the balance ever gets.
  16. Net Present Value (Medium): Given a discount rate and a list of yearly cash flows, starting with year 0, return the net present value, rounded to 2 decimals.
  17. Payback Period (Medium): Given what an investment cost and a list of monthly cash returns, return the first month (counting from 1) where the running total covers the cost.
  18. Profit Margin (Medium): Given [revenue, profit], return the profit margin as a percentage, rounded to a whole number.
  19. Best Month Profit (Hard): Given two arrays that line up, monthly revenue and monthly cost, return the biggest profit from any single month.
  20. Break-Even Month (Hard): Given each month's profit or loss, return the first month where the RUNNING TOTAL goes above 0, counting months from 1.
  21. Months to Double (Hard): Given a monthly growth rate as a percentage, return how many months until an amount doubles.

Practice another pattern

Or browse by subject

Browse all 676 puzzles