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

Add LinearSearchResursive.java and update README.md #356

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

Krounosity
Copy link

Recursive Linear Search uses the same technique as that of the iterative linear search.
A function, here LinearRecursive, is called at the start, pointing to the starting index of the array.
The function calls itself either until it finds the key element in the array, where it will return the index where it was found
or till the bounds of the array are exceeded, where -1 will be returned indicating that the key element is not present in the array.

Time complexity: O(n)
Space complexity: O(n) (function calls stored in memory stack)

Copy link
Owner

@kelvins kelvins left a comment

Choose a reason for hiding this comment

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

Could you please fix the README links?

@Krounosity
Copy link
Author

The changes have been made. Please do check

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