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<Integer>serviceLane(intn,List<List<Integer>>cases,List<Integer>width){// Write your code hereList<Integer>list=newArrayList<>();for(List<Integer>aCase:cases){intmin=width.get(aCase.get(0));for(intj=aCase.get(0);j<=aCase.get(1);j++)if(width.get(j)<min)min=width.get(j);list.add(min);}returnlist;}
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 →
java, pass the width list from main