title: How to check if 2 strings are alike by using recursion?
body: <p>For example </p>
  
  <pre><code>check("abs","abc");// Return true
  check("ab","ac");// Return false
  check("ab","abc");// Return false
  </code></pre>
  
  <p>How would you write this method recursively</p>
  
  <pre><code>      public static boolean check(String s1, String s2) {
  if (s1.equals(s2)) {
  return 1;
  if (s1.length &lt; s2.length) {
  return 0;
  if (s1.length &gt; s2.length) {
  return 0;
  if (s1.length == s2.length) {
  for (int i; i&lt; s1.length; i++){
  if(s1.charAt[i].equalss2.charAt[i]) {
  return 1
  
      ??
      }
  </code></pre>
  
  <p>I made a few changes and tried to approach first by myself but i dont know if this code will compile or do what i want it to do.</p>