Frage im Vorstellungsgespräch bei GoDaddy

Interview 1 Hackerrank DSA Quesiton (Medium to easy difficulty) as well as a question about how would I do Recursion for nested data