feat: add Jarvis March (Gift Wrapping) convex hull algorithm (#14225)

* Add Jarvis March (Gift Wrapping) convex hull algorithm

* Use descriptive parameter names per algorithms-keeper review

* Update jarvis_march.py

* Update jarvis_march.py

* fix: add pytest marker

* Update jarvis_march.py

* feat: removed doctests and created a separate test file for CI to pass

* Update jarvis_march_unit.py

* Update jarvis_march.py

* Update jarvis_march_unit.py

* feat: added test folder with tests to pass CI checks

* fix: duplicate points handled

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix: fixed ruff errors

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Ali Alimohammadi
2026-03-07 11:47:34 -08:00
committed by GitHub
parent 678dedbbf9
commit ac05f1248c
4 changed files with 303 additions and 1 deletions

View File

@@ -8,7 +8,7 @@ class HashTableWithLinkedList(HashTable):
super().__init__(*args, **kwargs)
def _set_value(self, key, data):
self.values[key] = deque([]) if self.values[key] is None else self.values[key]
self.values[key] = deque() if self.values[key] is None else self.values[key]
self.values[key].appendleft(data)
self._keys[key] = self.values[key]