Skip to content
Snippets Groups Projects
Commit 778d8d5a authored by Dominik Zobel's avatar Dominik Zobel Committed by Tobias Koelling
Browse files

Add content to second hands-on

parent 796c88f5
No related branches found
No related tags found
1 merge request!24complexity lecture
...@@ -514,9 +514,9 @@ None ...@@ -514,9 +514,9 @@ None
## Hands-on Session! {background-color=var(--dark-bg-color) .leftalign} ## Hands-on Session! {background-color=var(--dark-bg-color) .leftalign}
1. Create an array `x_values` with at least 4000 equally distributed elements ranging from -2.0 to 2.0 1. Create an array `x_values` with at least 4000 equally distributed elements ranging from -2.0 to 2.0
2. Starting from the left end (-2.0), use a binary search to find the highest value $x$ in the array `x_values`, 2. Starting from the left end (-2.0), implement a binary search to find the highest value $x$ in the array `x_values`,
for which $f(x) > 0$ for which $f(x) > 0$. How many steps and checks are necessary to find $x$?
3. How many steps would be necessary if `x_values` contained 4100 values? And for 3900?
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment