roykanti.blr
BAN USER
public int getMaxSum(int [] arr,int k,int sum){
if(k==2||k==1||k==0)
return sum+arr[0]+Math.max(arr[1], arr[2]);
else{
return sum +arr[k] + Math.max(getMaxSum(arr, k-1,sum), getMaxSum(arr, k-2,sum));
//return sum;
}
1.Initialize an array temp[] of the size of the target sum.
2.Iterate over the array
3.If arr[i] = k then
i.if temp[k] == 0
ii. mark temp[k] = 1 and temp[target sum - k] = -1
iii. if temp[k] == -1 then pair found print k and target sum - k
RepVealeJasso, Backend Developer at 247quickbookshelp
I am Veale, Learning and development manager handling the training and professional development of company employees. I love makeup, cats ...
Replarrymeisterl71, Analyst at ABC TECH SUPPORT
Working as Food cooking machine tender at Adray it's almost 10 years . Here I Operate or tend cooking equipment ...
RepMacHeist, Data Scientist at British Telecom
Mac, a Desktop Publishing Specialist at VitaGrey, where I provide document formatting and publishing support to a wide variety of ...
RepIsabellaRoy, Android Engineer at 8x8
I have excellent reporting and interviewing skills and award-writing techniques. I compose a variety of stories for print news and ...
Repkentyoung319, Applications Developer at ABC TECH SUPPORT
I am KentYoung . I am working as an Orthotics technician at The Wiz . As an orthotic technician,I manufacture orthotic ...
Repjanetjgonzales87, Android Engineer at 247quickbookshelp
Hello I am an internet developer. And I am very much sorry to travel and read some interesting books. Right ...
Repmariadbulter222, Android Engineer at ABC TECH SUPPORT
Hey, I am a corporate investigator. I love this work. My hobby like write story and different types of article ...
Repruchimosha, Analyst at Absolute Softech Ltd
My name is MaryDuncan . I am working at Crandall's Fine Furniture as a Probation officer . Here I am dealing ...
RepRoseLeen, abc at 8x8
I am a strongly seasoned and handworking entry level graphic designer with extraordinary creative thinking and project design abilities. I ...
RepValerieHill, abc at 8x8
I am a highly motivated development and community advocate with over 2 years experience fostering strong community relations product advancements ...
RepRomiTerry, Member Technical Staff at Cleartrip.com
Romi , a Dynamic Property Manager highly regarded for increasing and maintaining a high level of occupancy adhering to all regulations ...
They will give three problems.First one easy probably on arrays next one on trees and the third a design problem.How many problems they give also depends on how fast you solve the problems.The interview will last for 1 hr.The interviewer will help you in all possible way so discuss the problems and your thought process.All the best.
- roykanti.blr June 09, 2015