daily pastebin goal
75%
SHARE
TWEET

Untitled

a guest Sep 14th, 2018 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     public static String longestConsec(String[] s, int k) {
  2.         int length = s.length;
  3.        
  4.         if(length == 0 || k > length || k <= 0) {
  5.             return "";
  6.         }
  7.        
  8.         StringBuilder builder = new StringBuilder();
  9.        
  10.         for(String consec : s) {
  11.             builder.append(consec);
  12.         }
  13.        
  14.         return builder.toString();
  15.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top