Search:

Type: Posts; User: Cat

Search: Search took 0.05 seconds.

  1. Replies
    10
    Views
    3,157

    Look at the original algorithm. Every word gets...

    Look at the original algorithm. Every word gets inverted twice (tmpCpy becomes a backwards word, which is then inverted again when copied to reversedString). That will never be an optimal solution...
  2. Replies
    10
    Views
    3,157

    You could make it even simpler: string[]...

    You could make it even simpler:



    string[] words = input.Split(' ');
    Array.Reverse(words);
    string result = string.Join(" ", words);


    Anyhow, to the original poster, it's fine to do things...
Results 1 to 2 of 3