Conversation
✅ Deploy Preview for cyf-codewars-workshops ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
illicitonion
reviewed
Sep 2, 2025
illicitonion
left a comment
Member
There was a problem hiding this comment.
This looks great!
I'm generally trying to avoid generated files in this repo, but the starter code is handy so we should definitely include it.
It'd probably be handy to establish a convention like a couple of optional directories in a problem:
- solution
- starter-code
Solution we would probably just host in the repo and not publish on the website, and we could zip up starter-code into a zip file as part of the build process and host it? WDYT?
| This is important to our solution. | ||
|
|
||
| 1. How many ways can you find to compute the **difference** between terms from the given list (ie the list with one value missing)? | ||
| 1. We can reply on the first and last values as being present, so can you compute the difference using only the first and last values? |
Member
There was a problem hiding this comment.
Suggested change
| 1. We can reply on the first and last values as being present, so can you compute the difference using only the first and last values? | |
| 1. We can rely on the first and last values as being present. Can you compute the difference using only the first and last values? |
|
|
||
| ## How to find the 'difference' | ||
|
|
||
| In the full sequence `[1, 3, 5, 7, 9]`, the **difference** is 2. We can also think of it as the "gaps" between terms being the list `[2, 2, 2, 2]`. Note that the length of the full sequence is `5` but the number of "gaps" is only `4` (ie, length of the list `[2, 2, 2, 2]`). |
Member
There was a problem hiding this comment.
Suggested change
| In the full sequence `[1, 3, 5, 7, 9]`, the **difference** is 2. We can also think of it as the "gaps" between terms being the list `[2, 2, 2, 2]`. Note that the length of the full sequence is `5` but the number of "gaps" is only `4` (ie, length of the list `[2, 2, 2, 2]`). | |
| In the full sequence `[1, 3, 5, 7, 9]`, the **difference** is 2. We can also think of it as the "gaps" between terms being the list `[2, 2, 2, 2]`. Note that the length of the full sequence is `5` but the number of "gaps" is only `4` (i.e., length of the list `[2, 2, 2, 2]`). |
|
|
||
| This is important to our solution. | ||
|
|
||
| 1. How many ways can you find to compute the **difference** between terms from the given list (ie the list with one value missing)? |
Member
There was a problem hiding this comment.
Suggested change
| 1. How many ways can you find to compute the **difference** between terms from the given list (ie the list with one value missing)? | |
| 1. How many ways can you find to compute the **difference** between terms from the given list (i.e. the list with one value missing)? |
|
|
||
| ## Computing the difference | ||
|
|
||
| There is a way of computing the difference easily from the first and last value in the sequence. It relies on the fact that given the full sequence has `len` values in it, there are `len - 1` "gaps" and this gap is constant (ie it is the same every time). |
Member
There was a problem hiding this comment.
Suggested change
| There is a way of computing the difference easily from the first and last value in the sequence. It relies on the fact that given the full sequence has `len` values in it, there are `len - 1` "gaps" and this gap is constant (ie it is the same every time). | |
| There is a way of computing the difference easily from the first and last value in the sequence. It relies on the fact that given the full sequence has `len` values in it, there are `len - 1` "gaps" and this gap is constant (i.e. it is the same every time). |
illicitonion
reviewed
Sep 2, 2025
|
|
||
| ### What you should already know | ||
|
|
||
| You should have attended the previous two problem solving sessions. You will have learned the outline procedure for solving problems by: |
Member
There was a problem hiding this comment.
Suggested change
| You should have attended the previous two problem solving sessions. You will have learned the outline procedure for solving problems by: | |
| You should have attended the previous three problem solving sessions. You will have learned the outline procedure for solving problems by: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added workshop 4: Find the missing number in an arithmetic progression