top of page

Hacker Rank Problems & Solutions

  • Writer: Anand Nerurkar
    Anand Nerurkar
  • Jan 23, 2025
  • 1 min read

Updated: Jan 27, 2025


chocofunction

==


static int chocofest(int n, int c, int m){

int choco=n/c;

int newchoco=0;

int wrap=choco;


while(wrap>=m){

newchoco=wrap/m;

choco=choco+newchoco;

wrap=(wrap mod c + newchoco


}

return choco;


}



scenario 1



find digits

==







static string catAndMouse(int x,int y, int z){


int cat1tomousedist=0;

int cat2tomousedist=0;


//x---cat1 y ---cat2 z---mouse


if(x<z){

cat1tomousedist=z-x;

}else{

cat1tomousedist=x-z;

}


if(y<z){

     cat2tomousedist=z-y;

}else{

    cat2tomousedist=y-z;

}

if(cat1tomousedist==cat2tomousedist){

return "mouse C";

}else if (cat1tomousedist<cat2tomousedist){

return "Cat A ";

}else{

return "Cat B";

}

}

}

 
 
 

Recent Posts

See All
RFP PRE/POST-PROPOSAL SUBMISSION FLOW

🏆 1. The 5 Pillars to Win a Large Strategic Deal 1. Understand the Client Better Than They Do 👉 Don’t just read RFP — decode it What is their real problem ? What is driving this deal? (compliance, c

 
 
 
DIGITAL LENDING RFP Solution

🎯 RFP Proposal SOLUTION PRESENTATION – DIGITAL LENDING (WITH COLOR-CODED ARCHITECTURE) 1️⃣ Opening “Thank you for the opportunity. I’ll walk you through our approach to building a next-generation dig

 
 
 

Comments

Rated 0 out of 5 stars.
No ratings yet

Add a rating
  • Facebook
  • Twitter
  • LinkedIn

©2024 by AeeroTech. Proudly created with Wix.com

bottom of page