This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DECLARE @XML XML | |
SET @XML ='<Facility> | |
<Resources> | |
<Resource Type="Printer"> | |
<Item Id="3" Value="Bubbleshots Deskjet Pro" /> | |
<Item Id="253" Value="Topware LaserPrinter 5000" /> | |
<Item Id="7" Value="Jabberbox ClassyImage" /> | |
<Item Id="89" Value="Photoopia Megastar Over9000" /> | |
</Resource> | |
<Resource Type="Phone"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Program | |
{ | |
#region Private variables | |
// the secret password which we will try to find via brute force | |
private static string password = "p123"; | |
private static string result; | |
private static bool isMatched = false; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Example usage | |
* EXEC TestRecursion 5 | |
* | |
* Expected Output | |
* -----5 - NESTED LEVEL: 1 | |
* ----4 - NESTED LEVEL: 2 | |
* ---3 - NESTED LEVEL: 3 | |
* --2 - NESTED LEVEL: 4 | |
* -1 - NESTED LEVEL: 5 |
NewerOlder