Courses‎ > ‎APCS - Term 1‎ > ‎Konstantinovich‎ > ‎


posted Feb 4, 2019, 6:27 AM by Konstantinovich Samuel   [ updated Feb 4, 2019, 7:50 AM ]
Goal: More recursion practice

Guest talk:
Using a Neural Net to image/model the human brain
Today 3:45pm lecture hall A

Do Now: Discuss how to approach this problem:
When discussing assume you just want the letters a,b,c.
After you figure it out for abc, then consider maxLetter.
Return a List of all k letter strings of lowercase letters. 

Only the letters a-z inclusive, no capitalized letters or special characters.

1 <= maxLetter <= 26 , 1 is a, 26 is z.
Precondition: k >= 0

public static List<String> makeAllWords(int k, int
makeAllWords(1,26) returns the list:

makeAllWords(2,26) returns the list:

makeAllWords(3,3) returns the list:

makeAllWords(4,2) returns the list:

Hint: For practical testing purposes, start with a small maxLetter so you can see the results more easily.

1. write makeAllWords.
(Finish this at home)

2. Work on the extra codingbat problems posted :
(extra for those of you that finish in class, will be part of a homework later)