Skip to content

Edits to Complexity sprint 1#1428

Merged
SallyMcGrath merged 5 commits into
content/complexityfrom
dwh/complexity-sprint1
May 1, 2025
Merged

Edits to Complexity sprint 1#1428
SallyMcGrath merged 5 commits into
content/complexityfrom
dwh/complexity-sprint1

Conversation

@illicitonion
Copy link
Copy Markdown
Member

No description provided.

Copy link
Copy Markdown
Member

@SallyMcGrath SallyMcGrath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lovely! A few small text changes.

Comment thread common-content/en/module/complexity/big-o/index.md Outdated

Big-O notation is focused on the _trend_ of growth, not the exact growth.

If we think about strings, one character may take up one byte or four. If we think about doubling the length of the string, we don't worry about what characters are actually in the string. We think about the _trend_ - the string will take _about_ twice as much space. If the string only contained four-byte characters, and we only added one-byte characters, the string is still growing linearly, even though it may not take exactly double the space.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this might belong in the coursework ?

The trend is explained in the linked texts btw!

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the reading is quite vague on this - I think the only coverage is "Big O notation is used to express the worst-case scenario of an algorithm's runtime performance, abstracting away constants and lower-order terms to focus only on the most significant factors that affect the running time." which is easy to miss or mis-understand, so figured it was worth re-stating. Rephrased repetition is helpful...

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, let's just simplify this a bit then? I made a tiny edit

Comment thread common-content/en/module/complexity/caching/index.md
Comment thread common-content/en/module/complexity/memory-consumption/index.md Outdated
- Objects and arrays need memory for their internal organisation _as well_ as the data itself.
- Objects and arrays are stored in different ways in different languages. But they need to store _at least_ the information contained within them.
- This means an array of 5 elements will use _at least_ as much memory as the 5 elements would on their own.
- And objects will use _at least_ as much memory as all of the _values_ inside the object (and in some languages, all of the keys as well).
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, is this a bit too much info? We don't want to overload them.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe... Let's maybe have a chat about it?

I changed it because the previous content is kind of misleading - in most compiled programming languages, arrays and objects take exactly as much space as their contents/members/fields, so I wanted to avoid instilling an intuition that they have overhead where they don't necessarily...

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, it's a good point. I was trying to steer away from the python size of debacle I've encountered before with trainees and have oversteered.

Comment thread common-content/en/module/complexity/n+1/index.md
Comment thread common-content/en/module/complexity/worked-example-duplicate-encoder/index.md Outdated
@github-project-automation github-project-automation Bot moved this from 📋 Backlog to 🔖 Ready in Curriculum Planning Apr 30, 2025
illicitonion and others added 3 commits May 1, 2025 10:36
Copy link
Copy Markdown
Member

@SallyMcGrath SallyMcGrath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my edit on this


What does this mean? It means that the time is the square of the input size: n\*n.

An example is finding which elements in an array are present more than once. For each element, we need to check every other element in the same array to see if they're equal. If we double the number of elements in the array, we _quadruple_ the number of checks we need to do.
Copy link
Copy Markdown
Member

@SallyMcGrath SallyMcGrath May 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TBH I had intended these just as a visual, that's why I rm the examples - but if you want them, I'm ok with this

Comment thread common-content/en/module/complexity/big-o/index.md Outdated
@github-project-automation github-project-automation Bot moved this from 🔖 Ready to 👀 In review in Curriculum Planning May 1, 2025
@SallyMcGrath SallyMcGrath merged commit 596156e into content/complexity May 1, 2025
2 checks passed
@SallyMcGrath SallyMcGrath deleted the dwh/complexity-sprint1 branch May 1, 2025 11:26
@github-project-automation github-project-automation Bot moved this from 👀 In review to ✅ Done in Curriculum Planning May 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

2 participants