Hack with infy

Dude you clearly said that count keeps coming wrong. If you are not aware, anyone can see revisions of your withdrawn posts. And if you did not try submitting the code which someone posted, how would you came to know that it gave wrong answer. There is no way to access the question after the end of round.

Hackerrank practice questions and hackerrank for work questions are different. Practice questions are available to everyone publicly but Hackerrank for Work questions are specially designed for hiring tests. So yeah you won’t see them normally. But yes they are repeated in many companies.

@vichitr Man the gcd was taking all the sets hence the count was not coming.I have deleted it now as there was another 2.30 pm contest.I apologise for the post.But I have only 1 solved and one question of 6 test cases and i have left this question with only passing testcases with trial and error.

Yes, I agree on that bcz I gave contest on 28 June of cognizant company the question are from hackerrank for work , but not all questions from that.

Cheaters would try to cheat in anyway but you helped them in some way whether your intentions were wrong or not. I can help you in solving the problems if you like. But wait for the end of first round.

I think that’s more than enough for Codevita! But dude, try for other good companies. TCS doesn’t seem a good option for you. You can try Samsung, Amazon etc. Best of luck!

I know…I just take it for my backup. I’m pretty confident that I can crack in some Product Base company but let’s not overconfident about it.(Precautions are better than cure)

Although I was selected in Interview Bit Academy Batch 3 , so I think I can get better offer from there…

1 Like

Same here! Appearing for all hiring tests! Haha. Although i could solve only 5/6 in Codevita Zonal Round. And 2(1st & 3rd) full and 8/11 TCs in 2nd problem in HackWithInfy.

@ssrivastava990 am frm KJ somaiya mumbai
u can see my colg in my profile btw
yes i tried for code gladiator and but i could not give my 100% in round 2 (due to some personal probs)
hence not selected for final round

The round is ended yesterday 5:30 pm

Can u tell me more about interview academy batch 3

Have you any idea when the next batch will be open.

You can try out my code

#define ll long long
/*

  • Complete the ‘minMoves’ function below.
  • The function is expected to return an INTEGER.
  • The function accepts following parameters:
    1. LONG_INTEGER h
    1. LONG_INTEGER w
    1. LONG_INTEGER h1
    1. LONG_INTEGER w1
      */

long count1=0;

long minMovesa(long h,long h1){
if((h/h1)==1 && h%h1==0){
return count1;
}
else{
if((h%h1)==0){
h = h/h1;
count1++;
minMovesa(h,h1);
}
else{
if((h/h1)<2){
count1++;
return count1;
}
else{
long d;
d=h%h1;
h = h-d;
count1++;
minMovesa(h,h1);
}
}
}
return count1;
}

long minMovesb(long h,long h1){
if((h/h1)==1 && h%h1==0){
return count1;
}
else{
if((h%h1)==0){
h = h/h1;
count1++;
minMovesb(h,h1);
}
else{
if((h/h1)<2){
count1++;
return count1;
}
else{
long d;
d=h%h1;
h = h-d;
count1++;
minMovesb(h,h1);
}
}
}
return count1;
}

int minMoves(long h, long w, long h1, long w1) {
if(h/h1==1)
minMovesa(h,h1);
minMovesb(w,w1);
return count1;
}

How can I solve this question ?

This is a stupid problem.

1 Like

Care to post the rest of the problem? (It doesn’t seem to be complete)

yeah but still I am not able to solve it, kindly help me

Is it this problem exactly?

This may help.

Thank you for the help

1 Like