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.
Looks Like width array is not provided in the given method signature. Just added that and made appropriate changes to main method.
publicstaticList<Integer>serviceLane(intn,List<Integer>width,List<List<Integer>>cases){// Write your code hereList<Integer>s=newArrayList<>();//move through cases//get sublist of width//add min of sublist to scases.forEach(i->{intstart=i.get(0);intend=i.get(1)+1;List<Integer>sl=width.subList(start,end);intmin=Collections.min(sl);s.add(min);});System.out.println(n+" cases: "+cases+" width:"+width);returns;}
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
Looks Like width array is not provided in the given method signature. Just added that and made appropriate changes to main method.