Last active
December 16, 2015 18:29
-
-
Save kencenerelli/5478118 to your computer and use it in GitHub Desktop.
Interview Question: Reverse every word to spell them out backwards
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
| string text = "The quick brown fox jumps over the lazy dog"; | |
| char[] characters = text.ToArray(); | |
| StringBuilder sb = new StringBuilder(); | |
| for (int i= text.Length - 1; i >= 0; i--) | |
| { | |
| sb.Append(characters[i]); | |
| } | |
| string output = sb.ToString(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment