-
Convex hull is a subproblem in the divide and conquer algorithm for delaunay triangulation.
-
Implement in Python the *partition* algorithm – i.e. the non-recursive function `def partition(input_list, start, end, pivot_position)`. It takes a list and the positions of the first and last element…
-
Implement in Python the divide and conquer *quicksort* algorithm – i.e. the recursive `def quicksort(input_list, start, end)`. It takes a list and the positions of the first and last elements in the …
-
Implement in Python the *binary search algorithm* – i.e. the recursive function `def binary_search(item, ordered_list, start, end)`. It takes an item to search (i.e. `item`), an ordered list and a sta…
-
Divide and conquer algorithms are usually recursive. This is not the case here.
Delete comment?
Johann
-
**Is your feature request related to a problem? Please describe.**
https://leetcode.com/problems/find-peak-element/
A peak element is an element that is strictly greater than its neighbors.
Given…
-
At the moment, product is defined in the "obvious way", repeatedly multiplying along the list. This can be very slow in some cases, for example:
```
gap> f := FreeGroup(1);
gap> l := ListWithIdentica…
-
Implement the binary search algorithm in Python – i.e. the recursive function `def binary_search(item, ordered_list, start, end)`. It takes an item to search (i.e. item), an ordered list and a startin…
-
Implement the divide and conquer quicksort algorithm in Python – i.e. the recursive `def quicksort(input_list, start, end)`. First, it takes a list and the positions of the first and last elements to…
-
Implement in Python the partition algorithm – i.e. the non-recursive function `def partition(input_list, start, end, pivot_position)`. It takes a list and the positions of the first and last elements …