Folders


Serialization Public

Hard  

20min

Implement a function FolderNames, which accepts a string containing an XML file that specifies folder structure and returns all folder names that start with startingLetter. The XML format is given in the example below.

For example, for the letter 'u' and XML file:

<?xml version="1.0" encoding="UTF-8"?>
<folder name="c">
    <folder name="program files">
        <folder name="uninstall information" />
    </folder>
    <folder name="users" />
</folder>

the function should return "uninstall information" and "users" (in any order).

C# 5.0, .NET Framework 4.5
 
 


  •   Example case: System.NotImplementedException at Folders.FolderNames(String xml, Char startingLetter) in Folders.cs:line 8
  •   All folder names start with starting letter: System.NotImplementedException at Folders.FolderNames(String xml, Char startingLetter) in Folders.cs:line 8
  •   Root folder name starts with starting letter: System.NotImplementedException at Folders.FolderNames(String xml, Char startingLetter) in Folders.cs:line 8
  •   Complicated folder structure: System.NotImplementedException at Folders.FolderNames(String xml, Char startingLetter) in Folders.cs:line 8