We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
I am very much disappointed with hanker rank, your tool is so incorrect. below is the method run this code. It will pass your all use cases but the code is suppose to be failed it should not pass any use case at all.
It shows the quality of your tool and teriblle thing is most of the companies RELY ON YOU !! and fails people like in the interview because of your broken tool
take the case for this array { 5, 1, 2, 3, 7, 8, 6, 4 } it should exit out from the application on first element as 5, if lst[i] - (i + 1) =4 which is greater then 2 but it does not where as it does in local VS studio
publicstaticvoidminimumBribes(List<int>lst){intbribes=0;for(inti=0;i<lst.Count;i++){// Check if the person has moved more than two positions forwardif(lst[i]-(i+1)>2){Console.WriteLine("Too chaotic");return;// Exit the loop and stop processing}// Count the number of bribes received by the current personfor(intj=Math.Max(0,lst[i]-2);j<i;j++){if(lst[j]>lst[i]){bribes++;}}}Console.WriteLine(bribes);}}
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
New Year Chaos
You are viewing a single comment's thread. Return to all comments →
I am very much disappointed with hanker rank, your tool is so incorrect. below is the method run this code. It will pass your all use cases but the code is suppose to be failed it should not pass any use case at all.
It shows the quality of your tool and teriblle thing is most of the companies RELY ON YOU !! and fails people like in the interview because of your broken tool
take the case for this array { 5, 1, 2, 3, 7, 8, 6, 4 } it should exit out from the application on first element as 5, if lst[i] - (i + 1) =4 which is greater then 2 but it does not where as it does in local VS studio