ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 103 Weeks Ago, 4 Days Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 27 Apr 2017 My Price 8.00

Given a string x, a substring m from x

Recursion:

Given a string x, a substring m from x and a number n, write a recursive method (no loops) to check if at least n copies of the substring m appear in the string x. You should call your method checkForSub(). The method checkForSub() should take in 2 strings and an integer value and return a boolean.

For Example:

checkForSub("catcowcat", "cat", 2) → true

checkForSub("catcowcat", "cow", 2) → false

checkForSub("catcowcat", "cow", 1) → true

Test cases:

-----

Input:

x m n, where x and m are Strings, n is an integer

Sample Input:

catcowcat cat 2

Output:

A Boolean value

Sample Output:

true

-----

Answers

(11)
Status NEW Posted 27 Apr 2017 04:04 AM My Price 8.00

-----------

Not Rated(0)