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.
publicstaticList<int>serviceLane(intn,List<List<int>>cases,List<int>width){List<int>result=newList<int>(cases.Count);for(inti=0;i<cases.Count;i++){inta=cases[i][0],b=cases[i][1];//entry and exitintmin=width[a];for(intj=a+1;j<=b;j++)//I found minimum width{if(width[j]<min)min=width[j];}result.Add(min);}returnresult;}
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Service Lane
You are viewing a single comment's thread. Return to all comments →
C# Solution
YOU HAVE TO ADD WIDTH PARAMETER!!!