Skip to content
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

style: use proper spelling #25

Merged
merged 1 commit into from
Mar 26, 2024
Merged
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
2 changes: 1 addition & 1 deletion doc/data_structures/sorted_set/sorted_set.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

All operations operate on *values* rather than *references*.

Contrary to popular textbooks, operations don't return references to interally used data structures (such as tree nodes).
Contrary to popular textbooks, operations don't return references to internally used data structures (such as tree nodes).

This makes some sequences of operations slower.
For example if you first `find` a key and then upsert the same key using `insert`;
Expand Down
2 changes: 1 addition & 1 deletion src/data_structures/sorted_set/binary_search_tree.lua
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ function bst:succ(key)
return node and node.key
end

-- Analogeous to `succ`
-- Analogous to `succ`
local function pred_node(self, key)
local less_than = self.less_than
local function pred(node)
Expand Down
2 changes: 1 addition & 1 deletion src/data_structures/sorted_set/btree.lua
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ function btree:range_ascending(min_key, max_key)
end)
end

-- Analogeous to `range_ascending`
-- Analogous to `range_ascending`
function btree:range_descending(min_key, max_key)
if min_key == nil and max_key == nil then
return self:descending()
Expand Down
Loading