rashmishrikant.patil
BAN USER
- 0of 0 votes
AnswersMark likes to listen to music while travelling. His iPod™ contains N songs and he wants to listen to L (not necessarily different) songs during a trip. So he creates a playlist such that:
- rashmishrikant.patil in India
• Every song is played at least once.
• A song can be played again only if at least K other songs have been played
Mark wants to know how many different playlists are possible. Can you help Mark determine this number? As the number can be very large, display number modulo 1,000,000,007.
You are given N, K and L.| Report Duplicate | Flag | PURGE
Oracle Applications Developer Algorithm - 0of 0 votes
AnswersMr. Xhas recently shut down his factory and wants to sell off his metal rods to a local businessman. Mr. Octopus has many rods whose length are represented by array - lengths = {lengths[0], lengths[1], lengths[2], ...}.
- rashmishrikant.patil in India
The local businessman will only pay for rods that have same length. Let's say Mr. Octopus plans to sell rods of lengthL only. Then he had to cut each rod 0 or more time, so that he can maximize the profit. The remaining rods whose length is not L will be thrown away. Price of N rods of length L will be N × L × unit_price. Also note that for each cut made to a rod, he had to pay cut_cost.
What is the maximum amount of money Mr. Octopus can make? You have to complete the function int maxProfit(int cut_cost, int unit_price, int[] lengths).
Constraints
• lengths will contain between 1 to 50 elements, inclusive.
• Each element of lengths will lie in range [1, 10,000].
• 1 ≤ unit_price, cut_cost ≤ 1,000.
Sample Input #1:
cut_cost = 1
unit_price = 10
lengths = [26, 103, 59]
Sample Output #1:
1770| Report Duplicate | Flag | PURGE
Oracle Developer Program Engineer Algorithm
Repvivekwebediting, IC3 at Bazaarvoice
Mantra to break boyfriend's marriage is the best and the most effective mantra. If you interested in this mantra ...
RepAre you searching the best and strong Mantra to remove black magic. Here the best and the most powerful Astromagic ...
RepJohnMThomaa, Systems Design Engineer at USAA
Managed a small team writing about dust in Minneapolis, MN. Spent high school summers marketing Online vacuum pump sale New ...
Reprameshdondu15, Analyst at ASAPInfosystemsPvtLtd
My name is Ramesh dondu from India. I burn through 2009 to on words consistently work in Interior planner. I ...
RepA real dynamo when it comes to buying and selling carnival rides in Fort Lauderdale, FL. Spend several years working ...
RepMaryHDavis, Employee at ASU
Had a brief career promoting wooden tops in Salisbury, MD. My current pet project is lecturing about human hair in ...
RepTop Tiers provides latest english premier league articles and news to keep you up to date. Visit our website today ...
RepLooking for the best day care center Charlotte? Pal-A-Roo’s Child Development Center is a family owned child care facility ...
Repour goal is to help individuals companies and organizations of all kinds to communicate with their clients customer and employees ...
RepRhondaPBenedict, SEO at IIT-D
Mantra to break boyfriend's marriage is the best and the most effective mantra. If you interested in this mantra ...
RepSpent 2001-2006 getting my feet wet with Slinkies in Fort Walton Beach, FL. mantra to control girl Spent 2001-2006 working ...
RepPrestige Luxury Rentals, Tech Lead at Prestige Luxury Rentals
Prestige Luxury Rentals is highly recommended company for exotic car rental Miami. With our top brand vehicles like; exotic, luxury ...
RepDiscover the cheapest packers and movers in Gurgaon at best price with smooth and hassle free relocation. We provide truck ...
RepTerryDBonner, Employee at Electronic Arts
Maintained accurate personal records on maintenance crews and technical records on weekly insulation production.Have years of Installation and servicing ...
RepJohn Colcomb, Analyst at A9
With more than 20 years of car rental and dealership experience, responsible for developing growth strategies to maximize operational effectiveness ...
RepSherryellis555, Computer Scientist at ASAPInfosystemsPvtLtd
My name is Sherri Ellie Once had a fantasy of testing the market for tar in Georgia, GE. Rehearsed in ...
RepEdwards IVF Surrogate is one of the best & most successful provider of surrogate services.We provide moral, emotional, ethical and ...
Repfesfporyi212, Member Technical Staff
My self Fesfpory. I work in agriculture university in India as a professor. I done PHD in Botany in Punjab ...
RepAlisonjaeger755, Data Engineer at Accolite software
I am work in Telecom line in IDEA company. I am data operator and Engineer in back end in Idea ...
RepCrystalday777, Computer Scientist at AMD
My name is Crystal Day; I'm from Sydney, Australia, Get Ex Lost Love Back and I'm a sophomore ...
RepDo you want to marry with your desired person? The Islamic dua for marriage with a loved one has great ...
Replorfalinda8, Travel Agent at Creative Wealth
Hello, I am Janice. I help people make travel arrangements, which include booking flights, hotels, sightseeing tours, and making dining ...
RepDo you want to use Kamdev Vashikaran Mantra to subdue someone?Or If you are willing to attract your love ...