invincible1000
BAN USER- 0of 0 votes
AnswersMickey got an assignment from his school that he has to collect money from each house for next day's event. The city is built just like a 2-D array and each house owner kept certain amount for Mickey (for ex: The house owner at (i,j) coordinate kept A[i,j] for Mickey). Mickey is in a hurry and he wants to reach home as soon as possible otherwise he will miss the match between India and Bangladesh. Also he can only move to any adjacent house from his location, and he cannot move diagonally. So please find a way so that he will collect maximum amount from everyone if he will reach home earliest.
*Input Specification*
input1 = first input will tell you size of the array
input2 = String as shown in the example and you have to parse it to build your 2-D array
*Output Specification*
output1 = You need to set maximum amount collected to this global variable (type int)
*Example*
Consider input1 = 4 and it means school is at (0,0) and his house is at (4,4). In between the houses are like input2 = '(1,7,5,2),(5,12,3,6),(100,9,23,16),(16,4,5,9)'.
To collect maximum amount, Mickey should take his path {1,5,100,9,23,16,9} so that the total amount collected,output1 = 1 + 5 + 100 + 9 + 23 + 16 + 9 = 163
**CLARIFICATION **
The programming test was like this, you store the input into the variablesinput1
and
input2
and store the output to the variable
- invincible1000 in United Statesoutput1
| Report Duplicate | Flag | PURGE
Sap Labs 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 ...
Repmalloymirna65, Developer Advocate at 247quickbookshelp
I am Mirna Timekeeping clerks distribute and collect timesheets, timecards or work charts either as hard copies or electronically to ...
RepCallaRita, techsupport at Knowledge Systems
Hi, I am an Administrative person . It is to develop and sustain an early childhood organisation. I was a teacher ...
RepI am a management dietitian who plans food programs . I use personal counselling , cooking demonstrations, lectures and workshops as a ...
RepDo you Need Voodoo Spell For love, revenge or voodoo spells for cheaters? Consult Free right away to get custom ...
RepElenaKudaeva455, Music Piano Store at xyz
Hello Everyone,My name is Elena Kudaeva From NV,Nevada,USA.I am 16 years of age and I have ...
RepDiscover the best online vaporizer store to buy quality vaping accessories at affordable price. Visit NY Vape Shop, specialized in ...
Repstanjachrissi, Integration Software Engineer at xyz
Hi,my name is Stanja Chrissi. I was conceived and FL. I moved on from CA and went ahead to ...
RepLooking for the best day care center Charlotte? Pal-A-Roo’s Child Development Center is a family owned child care facility ...
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 ...
RepSherry Olson, Associate at Adap.tv
Spent childhood developing strategies for Love Problem Solution Molvi Ji. Crossed the country training crayon art in Washington, DC. Uniquely-equipped ...
RepEdwin Adcox, Dev Lead at Advisory Board Company
Welcome to the best and certified exotic car rental company of USA. Here, at Prestige luxury Rentals, we offer the ...
RepWilliamDGiles, Cloud Support Associate at ADP
Spent 2001-2006 creating marketing channels for tar worldwide. Was quite successful at building tobacco for farmers. Won several awards for ...
Repnormadyen, Blockchain Developer at 247quickbookshelp
I am working as a Pharmacy technician in Sunny Sypus company. I can maintain employee records for a company or ...
RepRocioNavarro189, None at Student
Hello Everyone,My name is Rocio Navarro Form Auckland,NZ,and 31 years old.I am searching for a servant ...
Reppamelacochran447, Intern at design
I am Pamela Cochran, and I am working as a Manager in Compact Disc Center. Last Month, I searched for ...
RepEdwards IVF Surrogate is one of the best & most successful provider of surrogate services.We provide moral, emotional, ethical and ...
RepDanielSWard, Accountant at Swimming Pools builder
U.S. Pool Builder is one of the most respected new inground gunite swimming pools designer Katy Tx. We use ...
RepRuizLeslie, Management accountant at Omni Superstore
Ruiz , a Management accountant with 4 years in the field of administrative functions, managing the office of the Leadership team ...