HackerRank Basics of Sets and Relations #2 problem solution

In this HackerRank Basics of Sets and Relations #2 problem solution You are given two sets.

Set A = {1,2,3,4,5,6}

Set B = {2,3,4,5,6,7,8}

How many elements are present in A ∩ B ?

Only enter the correct integer in the answering box. Do not include any extra spaces, tabs or newlines.

HackerRank Basics of Sets and Relations #2 problem solution


Problem solution in Java.

import java.io.*;
import java.util.*;

public class Solution {

    public static void main(String[] args) {
        /* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. */
        System.out.println("5");
    }
}


Post a Comment

0 Comments