1) Suppose you are searching for a girlâ€™s name written using only the three letters L, O and A.

1a) How many strings of four or fewer letters are there? (1)

1b) In the above possibilities, are you searching in a depth first or breadth first way? (1)

1c) What are the next three possible names you would write down starting with LO? (2)

1d) How many possibilities will you write down before getting to the name LOLA, show it by

implementation? (5)

1e) Are you guaranteed to find all girls names with letters L, O and A in this manner? (1)

I suggest you read this: http://cplusplus.com/forum/beginner/1/

And then show us what you've done so far.

And then show us what you've done so far.

if u think u are a good programmer enough to solve this problem then solve and prove urself ,

closed account (*zb0S216C*)

jpt wrote: |
---|

if u think u are a good programmer enough to solve this problem then solve and prove urself (sic) |

OK. I'll just fire-up my IDE and I'll write the code for you.

Last edited on

1a) How many strings of four or fewer letters are there? (1) |

0 letters -> 26

1 letter -> 26

2 letters -> 26

3 letters -> 26

4 letters -> 26

Therefore, there are

1b) In the above possibilities, are you searching in a depth first or breadth first way? (1) |

I used combinatorics. Did you even read my answer?

1c) What are the next three possible names you would write down starting with LO? (2) |

1. Loach

2. Loaches

3. Load

How many possibilities will you write down before getting to the name LOLA, show it by implementation? (5) |

One. : LOLA

Are you guaranteed to find all girls names with letters L, O and A in this manner? (1) |

Heck no.

Topic archived. No new replies allowed.