This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import java.io.*; | |
| import java.util.*; | |
| import java.text.*; | |
| import java.math.*; | |
| import java.util.regex.*; | |
| public class Solution { | |
| public static int distributeCandy(int [] score){ | |
| int [] fromLeft = new int[score.length]; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import java.io.*; | |
| import java.util.*; | |
| import java.text.*; | |
| import java.math.*; | |
| import java.util.regex.*; | |
| public class Solution { | |
| public static int distributeCandy(int [] score){ | |
| int [] fromLeft = new int[score.length]; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | public class MergeSortedArray { | |
| public static void main(String[] args) { | |
| // TODO Auto-generated method stub | |
| int ar1[] = {1,4,5,6,10,11}; | |
| int ar2[] = {2,3,4,5,6,7}; | |
| int [] result = merge(ar1,ar2); | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import java.util.HashSet; | |
| public class RepeatedString { | |
| public static void findRepeated(String str){ | |
| HashSet<String> set = new HashSet<>(); | |
| //System.out.println(str); | |
| String [] array = str.split(" |\\t|\\.|-|;"); | |
| int size = array.length; | |
| for(int i=0;i<size;i++){ | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | public class WeddingPlanner { | |
| static boolean matchfound = false; | |
| static double extrapolate(int amount, double[] unitCosts, int []amounts){ | |
| int indexes[] = findIndex(amount,amounts); | |
| System.out.println(indexes[0] +" "+ indexes[1] ); | |
| int offer1 = amounts[indexes[0]]; | |
| int offer2 = amounts[indexes[1]]; | |
| double unit1 = unitCosts[indexes[0]]; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | public class Ksubsequence { | |
| public static int solve(int[] arr, int d) | |
| { | |
| Object o; | |
| int Answer = 0; | |
| int[] hash = new int[d]; | |
| int sum = 0; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import java.util.regex.Pattern; | |
| import java.util.regex.Matcher; | |
| public class RegExp { | |
| static void findDomain(String str){ | |
| String p = "http://(www|ww2|web)\\.(\\w+\\.)+(\\w+)/"; | |
| Pattern pattern = Pattern.compile(p); | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | /* Node is defined as : | |
| class Node | |
| int data; | |
| Node left; | |
| Node right; | |
| */ | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | /* | |
| Given a string SS, find the number of "unordered anagrammatic pairs" of substrings. | |
| Input Format | |
| First line contains TT, the number of testcases. Each testcase consists of string SS in one line. | |
| Constraints | |
| 1≤T≤101≤T≤10 | |
| 2≤length(S)≤1002≤length(S)≤100 | |
| String SS contains only the lowercase letters of the English alphabet. | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | /* | |
| You are given two strings, AA and BB. Find if there is a substring that appears in both AA and BB. | |
| Input Format | |
| Several test cases will be given to you in a single file. The first line of the input will contain a single integer TT, the number of test cases. | |
| Then there will be TT descriptions of the test cases. Each description contains two lines. The first line contains the string AA and the second line contains the string BB. | |
| Output Format | 
NewerOlder