1
h10
CS16 F19
Name:
(as it would appear on official course roster)
Umail address: @umail.ucsb.edu section
Optional: name you wish to be called
if different from name above.
Optional: name of "homework buddy"
(leaving this blank signifies "I worked alone"

h10: Chapter 14: Recursion

ready? assigned due points
true Mon 11/25 12:30PM Thu 12/05 11:59PM

You may collaborate on this homework with AT MOST one person, an optional "homework buddy".

UPLOAD A PDF OF YOUR ANSWERS TO GRADESCOPE BEFORE THE DUE DATE. ASSOCIATE EACH QUESTION WITH A SPECIFIC PAGE IN YOUR HOMEWORK AT THE TIME OF SUBMISSION. There is NO MAKEUP for missed assignments;


Please:

  • No Staples.
  • No Paperclips.
  • No folded down corners.

Read Chapter 14 and the lecture notes.

1.(2 pts) How does a recursive function know when to stop recursing?

2.(3 pts) What is a LIFO scheme and how does it relate to stacks?

4.(5 pts) Write a recursive function to count the number of vowels in a string.

5.(10 pts) Write a function that deletes all the nodes with a given value in a linked list and returns a pointer to the new head of the list.

struct Node{
	int data;
	Node* next;
}
Node* deleteNode(Node* head, int value){