title: how to check if a list[string] is subset of another list[string] in scala
body: <p>I basically have two files input1 and input2 (both are List[string]). I want to check if they are sub-string to one another/identical. So, i have the below</p>
  
  <pre><code>Val conf = new SparkConf().setAppName (“check identical”)
  Val sc = new SparkContext(conf)
  val input 1 = sc.textFile(inputFile-L)
  Val input 2 = sc.textFile(inputFile-M) 
  
  // split up words
  val words1 = input1.flatMap(line=&gt; line.split(""))
  Val words2 = input2.flatMap(line=&gt;line.split(""))
  
  // Transform into word and count 
  val counts1 = words1.map(word =&gt; (word, reducebyKey{case(x,y) =&gt; x+y})
  val counts2 = words2.map(word =&gt; (word, reducebyKey{case(x,y) =&gt; x+y})
  </code></pre>
  
  <p>By above, I made sure that word count is same, now how to compare the subset? Any easy approaches to be taken ?</p>