Skip to content

docs: Fix a few typos #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions anagrams/solution.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ def anagrams(self, strs):
res = []
for i, s in enumerate(strs):
key = self.make_key(s)
# First occurence of an anagram
# First occurrence of an anagram
if key not in d:
d[key] = [s]
else:
Expand All @@ -26,7 +26,7 @@ def make_key(self, s):
else:
d[c] = 1
# Iterate form 'a' to 'z'
# This make sure the character occurences is ordered
# This make sure the character occurrences is ordered
# and thus unique
for i in range(ord('a'), ord('z') + 1):
c = chr(i)
Expand Down
2 changes: 1 addition & 1 deletion jump_game_ii/solution3.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def jump(self, nums):
Time Limit Exceeded
"""
n = len(nums)
# t[i] means mininum number of jumps to nums[i]
# t[i] means minimum number of jumps to nums[i]
t = [-1 for i in range(n)]
t[0] = 0
if n == 1:
Expand Down
4 changes: 2 additions & 2 deletions search_for_a_range/solution2.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def searchRange(self, nums, target):
right = n - 1
left_res = -1
right_res = -1
# Search for left bound (first occurence of target)
# Search for left bound (first occurrence of target)
while left + 1 < right:
mid = left + (right - left) / 2
if target > nums[mid]:
Expand All @@ -37,7 +37,7 @@ def searchRange(self, nums, target):
else:
return [-1, -1]

# Search for right bound (last occurence of target)
# Search for right bound (last occurrence of target)
left = 0
right = n - 1
while left + 1 < right:
Expand Down