contribution guidelines checks (#1787)

* spelling corrections

* review

* improved documentation, removed redundant variables, added testing

* added type hint

* camel case to snake case

* spelling fix

* review

* python --> Python # it is a brand name, not a snake

* explicit cast to int

* spaces in int list

* "!= None" to "is not None"

* Update comb_sort.py

* various spelling corrections in documentation & several variables naming conventions fix

* + char in file name

* import dependency - bug fix

Co-authored-by: John Law <johnlaw.po@gmail.com>
This commit is contained in:
matkosoric
2020-03-04 13:40:28 +01:00
committed by GitHub
parent 2b19e84767
commit 7f04e5cd34
57 changed files with 198 additions and 198 deletions

View File

@@ -344,19 +344,19 @@ def convex_hull_recursive(points):
right_most_point = points[n - 1]
convex_set = {left_most_point, right_most_point}
upperhull = []
lowerhull = []
upper_hull = []
lower_hull = []
for i in range(1, n - 1):
det = _det(left_most_point, right_most_point, points[i])
if det > 0:
upperhull.append(points[i])
upper_hull.append(points[i])
elif det < 0:
lowerhull.append(points[i])
lower_hull.append(points[i])
_construct_hull(upperhull, left_most_point, right_most_point, convex_set)
_construct_hull(lowerhull, right_most_point, left_most_point, convex_set)
_construct_hull(upper_hull, left_most_point, right_most_point, convex_set)
_construct_hull(lower_hull, right_most_point, left_most_point, convex_set)
return sorted(convex_set)