Problem:
Question 1: Use python Write a recursive function called complement(n) that returns the complement of a string of binary digits. That is, the "flipped" representation of the input string n.
Question 2: Generics key value pair
- Declare a generic class called KeyValuePair
- It has two type parameters, K and V
- Declare two fields: key of type K and value of type V
- Create a parameterized constructor to initialize the fields
Please Explain don't just write the answer.