Skip to main content
The 2025 Developer Survey results are in. Explore insights into technology and tools, careers, community and more. View results.

All Questions

Filter by
Sorted by
Tagged with
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, ...
cocomac's user avatar
  • 123
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. ...
Vittorio A.'s user avatar
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 ...
Tobi Alafin's user avatar
  • 1,792
0 votes
3 answers
923 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: ...
Farkas István's user avatar
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 ...
Hungry Blue Dev's user avatar