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

Added Ternary_Search.rb #2921

Merged
merged 2 commits into from
May 31, 2020
Merged

Added Ternary_Search.rb #2921

merged 2 commits into from
May 31, 2020

Conversation

atarax665
Copy link
Contributor

@atarax665 atarax665 commented May 14, 2020

Fixes #2176

Checklist:

  • 4 space indentation.
  • Coding conventions are followed.
  • Input is taken dynamically.
  • Sample Input / Output is added at the end of file.
  • Logic Documentation (Comments).
  • File names are correct.

Make sure these boxes are checked before your pull request (PR) is ready to be reviewed and merged. Thanks!

Changes proposed in this pull request:

  • Added ternary search in ruby

Languages Used:

  • Ruby

Files Added:

  • Ternary_Search.rb

We're happy to help you get this ready -- don't be afraid to ask for help.

Thanks!

@atarax665 atarax665 changed the title Create Ternary_Search.rb Added Ternary_Search.rb May 14, 2020
Copy link
Collaborator

@MastersAbh MastersAbh left a comment

Choose a reason for hiding this comment

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

please make this change

@@ -0,0 +1,43 @@
def ternarySearch(l, r, key, ar) #function to perform ternary search
Copy link
Collaborator

Choose a reason for hiding this comment

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

Add problem statement at start of file

Copy link
Contributor Author

@atarax665 atarax665 May 20, 2020

Choose a reason for hiding this comment

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

@MastersAbh Should I add description of ternary search in the beginning?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@atarax665 atarax665 requested a review from MastersAbh May 30, 2020 10:54
@MastersAbh MastersAbh merged commit 8433ec3 into jainaman224:master May 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ternary Search
2 participants