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.
publicstaticStringcanConstruct(List<Integer>a){// Return "Yes" or "No" denoting whether you can construct the required number.intsum=0;int[]arr=a.stream().mapToInt(Integer::intValue).toArray();for(intl:arr){sum+=l;}if(sum%3==0)return"Yes";}
Constructing a Number
You are viewing a single comment's thread. Return to all comments →
My solution for this code is.