Domanda di colloquio di Amazon

How would you implement document.querySelectorAll manually using recursion?