How many times is the function wordScramble() called in the given program? public class WordScramble { public
Fantastic news! We've Found the answer you've been seeking!
Question:
How many times is the function wordScramble() called in the given program?
public class WordScramble { public static void wordScrarnble(String rem, String scr) { if (rem.isEmpty()) { System.out.println(scr + rem); } else { for (int i= O; i < rem.length(); ++i) { wordScrarnble((rem.substring(O, i) + rem.substring(i + 1, rem.length())), (scr + rem.charAt(i))); } } }
public static void main(String args[]) {
wordScramble ( "ab" ," " ) ;
} }
Related Book For
OCP Oracle Certified Professional Java SE 11 Developer Practice Tests Exam 1Z0 819 And Upgrade Exam
ISBN: 9781119696131
1st Edition
Authors: Scott Selikoff, Jeanne Boyarsky
Posted Date: