title: Searching char arrays to see if the char matches
body: <p>I have two char arrays that takes two strings as the input. If the char on either side has the matching char, for example after translating the char Arrays into string char A and B both have at least one H or R, then it will return true. If not then return false.</p>
  
  <pre><code>&gt;char[] A = foo(A).toCharArray();
  &gt;
  &gt;char[] B = foo(B).toCharArray();
  &gt;
  &gt;System.out.println("String "+A+": "+Arrays.toString(A));
  &gt;
  &gt;System.out.println("String "+B+": "+Arrays.toString(B));
  
  &gt;String A: [H,  , R,  ]
  &gt;
  &gt;String B: [R,  , R, R]
  &gt;&gt;This will return true
  
  &gt;String A: [ , H,  , R]
  &gt;
  &gt;String B: [H, H,  , H]
  &gt;&gt;This will return true
  
  &gt;String A: [H,  , H,  ]
  &gt;
  &gt;String B: [R,  , R,  ]
  &gt;&gt;This will return false
  </code></pre>
  
  <p>I'm confused how to make such rule?</p>