jadjoubran / codetogo.io

🚀 JavaScript code to go - Find updated snippets for common JavaScript use cases
https://codetogo.io
MIT License
231 stars 30 forks source link

Use Case Suggestion: Search through an array. #18

Closed theIYD closed 6 years ago

theIYD commented 6 years ago

Traversing an array using Linear Search or Binary Search solves a lot of problems while playing with data.

Thanks 😉

jadjoubran commented 6 years ago

Thanks @theIYD!

theIYD commented 6 years ago

Anything for contributions ! ✌️ @jadjoubran

jadjoubran commented 6 years ago

do you have by any change some sample code? I haven't done proper research yet but mots of the answers on codetogo are less than 10 lines at most (of course without using implicit return and short variable names such as a and b) as the goal is to make the answer understandable for the learner

theIYD commented 6 years ago

I have made a open sourced library on functions exclusively. Linear Search and Binary Search implementations are available over there.

Check it out over here :- https://github.com/theIYD/functions.js/blob/master/src/algorithms/functions/linearSearch.js

jadjoubran commented 6 years ago

that's really cool! I just starred it I love the idea however for now, Code to go is only meant for generic use cases, mainly to avoid overlapping with other websites/repo such as #21 I'll keep this issue open for Later, as we are adapting based on the audience's feedback 😄

theIYD commented 6 years ago

It's absolutely alright ! I will contribute to Code To Go on a regular basis.

Thanks for the star ! ❤️