GithubHelp home page GithubHelp logo

manul-test's Introduction

import java.util.ArrayList; import java.util.List;

public class Distinct {

public static void main(String[] args) {

String  str1 = "workitems are stuck inprogress";  
String  str2 = "transformation mappting failing";
String  str3 = "not able to transform failing";
String  str4 = "workitems are not progressing";
String  str5 = "tickets are stuck inprogress";
String  str6 = "inward mapping is failing";

String[] words1 = str1.split(" ");
String[] words2 = str2.split(" ");
String[] words3 = str3.split(" ");
String[] words4 = str4.split(" ");
String[] words5 = str5.split(" ");
String[] words6 = str6.split(" ");

int numberOfStrings = 6;
List<String[]> strings = new ArrayList<>();
strings.add(words1);
strings.add(words2);
strings.add(words3);
strings.add(words4);
strings.add(words5);
strings.add(words6);

for (int i = 0; i < numberOfStrings; i++) {	
    for (int j = i+1; j < numberOfStrings;j++) {	
        boolean output = wordsInBoth(strings.get(i), strings.get(j));
        System.out.println((i+1)+" "+(j+1)+" "+output);
}
}

}

public static boolean wordsInBoth(String[] words1, String[] words2) {

for (int i = 0; i < words1.length; i++) {
    for (int j = 0; j < words2.length; j++) {
        if (words1[i].equalsIgnoreCase(words2[j]))
            return true;
    }
}

return false;

} }

manul-test's People

Contributors

rohit-ghadge avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.