Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Katricia - Edges - Reverse Sentence #32

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

krsmith7
Copy link

No description provided.

@@ -57,89 +59,8 @@ def reverse_words(sentence)
end
end

def reverse_sentence(my_sentence)
reversed = string_reverse(my_sentence)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since you are doing all the string manipulations in place, you don't need to return anything or assign the returned value to anything. reverse_sentence could simply be:

   string_reverse(my_sentence)
   reverse_words(my_sentence)
   return

@shrutivanw
Copy link

Nice work!

See the minor comment added inline.

I didn't see any comment or description to explain the time and space complexities of your algorithm. Take a read through an explanation on https://github.com/Ada-C10/reverse_sentence/blob/solution/lib/reverse_sentence.rb and slack me if you have any questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants