linea-tracer
linea-tracer copied to clipboard
fix: Fix issues in binary_search.sh
This update improves the JSON generation process by using jq, ensuring proper handling of quotes and spaces.
I've also fixed the issue with mid rounding, where it now correctly rounds up, preventing infinite recursion.
Additionally, checks have been added before recursion to ensure that we don't repeatedly call the same range:
if [ "$mid" -gt "$start" ] and if [ "$mid" -lt "$end" ].
This should prevent unnecessary loops and improve performance.
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code