mirror of
https://github.com/TheAlgorithms/Python.git
synced 2026-03-13 09:50:19 +08:00
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:
@@ -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]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user