Summit Bank Interview Question

Write a recursive function to accept and reject objects based on type with child objects.