Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: bhrigukansra/algorithms-in-C-Cplusplus-Java-Python-JavaScript
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: Pramothini-Sekar/algorithms-in-C-Cplusplus-Java-Python-JavaScript
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Feb 20, 2019

  1. Created maximumCupcakes problem

    Sarah loves going to her favorite bakery, Zillycakes, with n dollars to buy cupcakes. Each cupcake has a flat cost of c dollars, and the store has a promotion where they give you 1 free cupcake for every m cupcake wrappers you trade in.
    
    For example, if m = 2 and Sarah has n = 4 dollars that she uses to buy 4 cupcakes at c = 1 dollar apiece, she can trade in the 4 wrappers to buy 2 more cupcakes. Now she has 2 more wrappers that she can trade in for 1 more cupcake. Because she only has 1 wrapper left at this point and 1 < m, she was only able to eat a total of 7 cupcakes.
    Pramothini-Sekar authored Feb 20, 2019
    Configuration menu
    Copy the full SHA
    b5ee27b View commit details
    Browse the repository at this point in the history
Loading