All Questions
5 questions
2
votes
3
answers
185
views
Calculating square roots using binary search
I'm trying to find the square root of a number (num) using binary search in Rust. I'm new to Rust, but I've done quite a bit of programming in other languages, ...
3
votes
2
answers
476
views
Sorting an array using a Binary Search Tree with C++
Given an array of integer (all different from each other), this program creates a BST with the array elements in order to sort them and put them back into the array, using the BST properties.
...
4
votes
1
answer
154
views
Generalisation of Binary Search
I wrote a function to implement a generalised version of binary search that can find the minimum or maximum index in a given sorted list that satisfies a provided predicate.
My Code
...
0
votes
3
answers
914
views
Binary search algorithm in Clojure
I'm absolutely new to Clojure (started learning it yesterday). After I went through some tutorials and checked out the basics I implemented the following Binary search algorithm:
...
2
votes
1
answer
711
views
A binary search implementation for any datatype in C (continuation)
This is an indirect follow-up to this post.
I've tried to assimilate all that was instructed and here's my attempt at binary search.
binary_search.h
...