Which data structure is commonly used to represent a file system hierarchy?

  • Array
  • Queue
  • Stack
  • Tree
A file system hierarchy is commonly represented using a tree data structure. In this structure, directories (folders) are nodes, and files are the leaves or nodes without children. Each directory node can have multiple child nodes, reflecting the nested organization of files and directories within the system. This hierarchical representation facilitates efficient file navigation and management operations, such as creating, moving, and deleting files and directories.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *