Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
92204dc
fix: update binary search for first occurrence and fix syntax errors
tusharynayaka Mar 3, 2026
ca1c615
fix: binary search first occurrence and resolve global ruff linting e…
tusharynayaka Mar 3, 2026
9fe6d31
fix: binary search first occurrence and resolve global ruff linting e…
tusharynayaka Mar 3, 2026
a1b12ac
fix: binary search first occurrence and resolve global ruff linting e…
tusharynayaka Mar 3, 2026
4dc8470
fix: binary search first occurrence and resolve global ruff linting e…
tusharynayaka Mar 3, 2026
c23157f
fix: binary search first occurrence and resolve global ruff linting e…
tusharynayaka Mar 3, 2026
e94ff2c
fix: total cleanup of jump_search for ruff and mypy
tusharynayaka Mar 3, 2026
3c96273
fix: address ruff I001, UP047, and W292 in jump_search
tusharynayaka Mar 3, 2026
d308b35
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 3, 2026
2662eb5
Merge branch 'master' into fix-binary-search-final
tusharynayaka Mar 18, 2026
a48a595
Merge branch 'master' into fix-binary-search-final
tusharynayaka Mar 31, 2026
d43ff7c
Merge branch 'master' into fix-binary-search-final
tusharynayaka Apr 8, 2026
b13b6e0
fix: remove hidden whitespace and fix newline in jump_search
tusharynayaka Mar 3, 2026
4235f83
Fix: implement first occurrence logic and restore doctests
tusharynayaka Apr 9, 2026
5ede257
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 9, 2026
f858e21
style: fix import sorting to satisfy ruff
tusharynayaka Apr 9, 2026
40090f0
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 9, 2026
f059c6d
final: restore original doctests and fix logic inconsistencies
tusharynayaka Apr 9, 2026
5a9e860
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 9, 2026
893abd3
Merge branch 'master' into fix-binary-search-final
tusharynayaka Apr 15, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: binary search first occurrence and resolve global ruff linting e…
…rrors
  • Loading branch information
tusharynayaka committed Mar 3, 2026
commit 9fe6d31c1b9dbd265f88ca62d240645325435137
2 changes: 1 addition & 1 deletion data_structures/hashing/hash_table_with_linked_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
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]

Check failure on line 11 in data_structures/hashing/hash_table_with_linked_list.py

View workflow job for this annotation

GitHub Actions / ruff

ruff (RUF037)

data_structures/hashing/hash_table_with_linked_list.py:11:28: RUF037 Unnecessary empty iterable within a deque call help: Replace with `deque()`
self.values[key].appendleft(data)
self._keys[key] = self.values[key]

Expand Down
2 changes: 1 addition & 1 deletion searches/jump_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
T = TypeVar("T", bound=Comparable)


def jump_search[T](arr: Sequence[T], item: T) -> int:
def jump_search(arr: Sequence[T], item: T) -> int:

Check failure on line 23 in searches/jump_search.py

View workflow job for this annotation

GitHub Actions / ruff

ruff (UP047)

searches/jump_search.py:23:5: UP047 Generic function `jump_search` should use type parameters help: Use type parameters
"""
Python implementation of the jump search algorithm.
Return the index if the `item` is found, otherwise return -1.
Expand Down
Loading