Capgemini Interview Question

Listing out only the directories in a path without using find command.