From bff5bf4947c22e39a66caaa9dc813db1cd72f671 Mon Sep 17 00:00:00 2001 From: Tianyi Liu Date: Mon, 19 Oct 2026 20:44:41 +0800 Subject: [PATCH 1/6] Update A1 instructions for MLF2 --- 02_activities/assignments/assignment_1.ipynb | 136 +++++++++++-------- 1 file changed, 78 insertions(+), 58 deletions(-) diff --git a/02_activities/assignments/assignment_1.ipynb b/02_activities/assignments/assignment_1.ipynb index f02523c4..b548e253 100644 --- a/02_activities/assignments/assignment_1.ipynb +++ b/02_activities/assignments/assignment_1.ipynb @@ -10,17 +10,20 @@ "\n", "This assignment aims to demonstrate how to study a data structures or algorithms question in depth to prepare for an industry coding interview. Leetcode is a popular coding practice site that many use to practice for technical interviews. Like behavioral interviews, it's important to practice and keep your skills sharp.\n", "\n", - "## Group Size\n", - "\n", - "Please complete this individually.\n", + "## Instructions\n", + "Please complete this assignment individually.\n", "\n", "## Parts:\n", - "- Part 1: Figure out the problem you have been assigned, and understand the problem\n", - "- Part 2: Answer the questions about your assigned problem (including solving it)\n", + "- Part 1: Figure out the problem you have been assigned and understand the problem description. You are only required to solve **one** out of the three problems in this notebook.\n", + "- Part 2: Answer a set of questions about your assigned problem (including solving it).\n", "\n", "## Part 1:\n", "\n", - "_*You will be assigned one of three problems based of your first name. Enter your first name, in all lower case, execute the code below, and that will tell you your assigned problem. Include the output as part of your submission (do not clear the output). The problems are based-off problems from Leetcode.*_\n" + "You will be assigned one of three problems based of your first name. **Enter your first name** as the `input_string`, in all lower case, execute the code below, and that will tell you your assigned problem. Include the output as part of your submission (do not clear the output). The problems are based-off problems from Leetcode.\n", + "\n", + "💡 We are using a hash function here.\n", + "\n", + "**Note**: you will code your solution in Part 2.\n" ] }, { @@ -37,32 +40,40 @@ " return (hash_int % 3) + 1\n", "input_string = \"your_first_name_here\"\n", "result = hash_to_range(input_string)\n", - "print(result)\n" + "print(f\"Your assigned problem is: {result}\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "## Question One: First Duplicate in List\n", + "## Problem One: First Duplicate in List\n", "**Description** \n", - "Given a list of integers, return the **first value that appears more than once**. If there are multiple duplicates, return the one that appears **first** in the list. If no duplicate exists, return `-1`.\n", + "Given a list of non-negative integers, return the **first value that appears more than once**. If there are multiple duplicates, return the one whose duplicate appears **first** in the list (see example 4). If no duplicate exists, return `-1`.\n", "\n", "**Examples**\n", + "* Example 1: one duplicate\n", + " ```python\n", + " Input: nums = [3, 1, 4, 2, 5, 1, 6]\n", + " Output: 1\n", + " ```\n", + "* Example 2: no duplicate\n", + " ```python\n", + " Input: nums = [7, 8, 9, 10]\n", + " Output: -1\n", + " ```\n", + "* Example 3: multiple duplicates\n", + " ```python\n", + " Input: nums = [4, 5, 6, 4, 6]\n", + " Output: 4\n", + " ```\n", + "* Example 4: multiple duplicates \n", "```python\n", - "Input: nums = [3, 1, 4, 2, 5, 1, 6]\n", + "Input: nums = [0, 1, 2, 1, 0]\n", "Output: 1\n", "```\n", - "```python\n", - "Input: nums = [7, 8, 9, 10]\n", - "Output: -1\n", - "```\n", - "```python\n", - "Input: nums = [4, 5, 6, 4, 6]\n", - "Output: 4\n", - "```\n", "\n", - "**Question 1 Starter Code**" + "**Problem 1 Starter Code**" ] }, { @@ -82,32 +93,37 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Question Two: Valid Bracket Sequence\n", + "## Problem Two: Valid Bracket Sequence\n", "**Description** \n", - "Given a string containing only the characters `'('`, `')'`, `'{'`, `'}'`, `'['`, and `']'`, determine if the input string is a **valid bracket sequence**. \n", - "A string is valid if:\n", + "Given a string containing only the characters `'('`, `')'`, `'{'`, `'}'`, `'['`, and `']'`, determine if the input string is a **valid bracket sequence**.\n", + "\n", + "A sequence is valid if:\n", "- Open brackets are closed by the same type of brackets, and\n", "- Open brackets are closed in the correct order.\n", "\n", "**Examples**\n", - "```python\n", - "Input: s = \"([]{})\"\n", - "Output: True\n", - "```\n", - "```python\n", - "Input: s = \"([)]\"\n", - "Output: False\n", - "```\n", - "```python\n", - "Input: s = \"()[]{}\"\n", - "Output: True\n", - "```\n", - "```python\n", - "Input: s = \"[{]}\"\n", - "Output: False\n", - "```\n", + "* Example 1:\n", + " ```python\n", + " Input: s = \"([]{})\"\n", + " Output: True\n", + " ```\n", + "* Example 2:\n", + " ```python\n", + " Input: s = \"([)]\"\n", + " Output: False\n", + " ```\n", + "* Example 3:\n", + " ```python\n", + " Input: s = \"()[]{}\"\n", + " Output: True\n", + " ```\n", + "* Example 4:\n", + " ```python\n", + " Input: s = \"[{]}\"\n", + " Output: False\n", + " ```\n", "\n", - "**Question 2 Starter Code**" + "**Problem 2 Starter Code**" ] }, { @@ -125,19 +141,23 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Question Three: Move All Zeros to End\n", + "## Problem Three: Move All Zeros to End\n", "**Description** \n", "Given a list of integers, move all zeros to the end while maintaining the relative order of the non-zero elements. \n", "\n", "**Examples**\n", - "```python\n", - "Input: nums = [0, 1, 0, 3, 12]\n", - "Output: [1, 3, 12, 0, 0]\n", - "```\n", - "```python\n", - "Input: nums = [4, 0, 5, 0, 0, 6]\n", - "Output: [4, 5, 6, 0, 0, 0]\n", - "```\n" + "* Example 1:\n", + " ```python\n", + " Input: nums = [0, 1, 0, 3, 12]\n", + " Output: [1, 3, 12, 0, 0]\n", + " ```\n", + "* Example 2:\n", + " ```python\n", + " Input: nums = [4, 0, 5, 0, 0, 6]\n", + " Output: [4, 5, 6, 0, 0, 0]\n", + " ```\n", + "\n", + "**Problem 3 Starter Code**" ] }, { @@ -160,7 +180,7 @@ "\n", "## Part 2:\n", "\n", - "- Paraphrase the problem in your own words\n" + "1. Paraphrase the assigned problem in your own words.\n" ] }, { @@ -176,7 +196,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "- In this .ipynb file, there are examples that illustrate how the code should work (the examples provided above). Create 2 new examples for the question you have been assigned, that demonstrate you understand the problem. For question 1 and 2, you don't need to create the tree demonstration, just the input and output.\n" + "2. In your assigned problem, there are a few provided examples with their expected outputs. Create 2 new examples with corresponding outputs for the problem you have been assigned to demonstrate that you have understood the problem." ] }, { @@ -192,8 +212,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "\n", - "- Code the solution to your assigned problem in Python (code chunk). Note: each problem can be solved more simply if you use an abstract data type that is suitable for that problem. Using that try to find the best time and space complexity solution!\n" + "3. Based on the provided starter code, code the solution to your assigned problem here in Python. **Note**: each problem can be solved more simply if you use an abstract data type that is suitable for that problem. Try to find the solution with best time and space complexity." ] }, { @@ -210,7 +229,7 @@ "metadata": {}, "source": [ "\n", - "- Explain why your solution works\n" + "4. Walk through your Python code in plain words and explain why your solution works.\n" ] }, { @@ -227,7 +246,7 @@ "metadata": {}, "source": [ "\n", - "- Explain the problem’s time and space complexity\n" + "5. Explain the time and space complexity of your solution.\n" ] }, { @@ -244,7 +263,7 @@ "metadata": {}, "source": [ "\n", - "- Explain the thinking to an alternative solution (no coding required, but a classmate reading this should be able to code it up based off your text)\n" + "6. Describe an alternative solution to your problem in plain words, e.g., with a different data structure or time/space complexities. **Note**: you don't need to code your alternative solution, but a classmate reading this should be able to code it based on your description.\n" ] }, { @@ -282,12 +301,13 @@ "🚨 **Please review our [Assignment Submission Guide](https://github.com/UofT-DSI/onboarding/blob/main/onboarding_documents/submissions.md)** 🚨 for detailed instructions on how to format, branch, and submit your work. Following these guidelines is crucial for your submissions to be evaluated correctly.\n", "\n", "### Submission Parameters:\n", - "* Submission Due Date: `HH:MM AM/PM - DD/MM/YYYY`\n", + "* Submission Due Date: `2026-10-26 11:59PM ET`\n", "* The branch name for your repo should be: `assignment-1`\n", "* What to submit for this assignment:\n", - " * This Jupyter Notebook (assignment_1.ipynb) should be populated and should be the only change in your pull request.\n", + " * This Jupyter Notebook (assignment_1.ipynb) should be populated and should be the **only change** in your pull request.\n", "* What the pull request link should look like for this assignment: `https://github.com//algorithms_and_data_structures/pull/`\n", " * Open a private window in your browser. Copy and paste the link to your pull request into the address bar. Make sure you can see your pull request properly. This helps the technical facilitator and learning support staff review your submission easily.\n", + "* Please **do not** merge your pull request until one of the learning support staff has approved it. Closed or merged pull requests will not be reviewed. If changes are suggested, please follow the instructions in the thread and revise your submission. \n", "\n", "Checklist:\n", "- [ ] Create a branch called `assignment-1`.\n", @@ -295,7 +315,7 @@ "- [ ] Review [the PR description guidelines](https://github.com/UofT-DSI/onboarding/blob/main/onboarding_documents/submissions.md#guidelines-for-pull-request-descriptions) and adhere to them.\n", "- [ ] Verify that the link is accessible in a private browser window.\n", "\n", - "If you encounter any difficulties or have questions, please don't hesitate to reach out to our team via our Slack at `#cohort-3-help`. Our Technical Facilitators and Learning Support staff are here to help you navigate any challenges." + "If you encounter any difficulties or have questions, please don't hesitate to reach out to our team via our Slack at `#mlf2-help`. Our Technical Facilitators and Learning Support staff are here to help you navigate any challenges." ] } ], From f85af24def6986eb953d9c8ef2a0f336b26ac004 Mon Sep 17 00:00:00 2001 From: Tianyi Liu Date: Mon, 19 Oct 2026 20:44:56 +0800 Subject: [PATCH 2/6] Update A2 instructions for MLF2 --- 02_activities/assignments/assignment_2.ipynb | 195 +++++++++---------- 1 file changed, 91 insertions(+), 104 deletions(-) diff --git a/02_activities/assignments/assignment_2.ipynb b/02_activities/assignments/assignment_2.ipynb index 9cd23b81..8fb20e3c 100644 --- a/02_activities/assignments/assignment_2.ipynb +++ b/02_activities/assignments/assignment_2.ipynb @@ -8,21 +8,23 @@ "\n", "## Objective\n", "\n", - "_*The partner assignment aims to provide participants with the opportunity to practice coding in an interview context. You will analyze your partner's Assignment 1. Moreover, code reviews are common practice in a software development team. This assignment should give you a taste of the code review process.*_\n", + "This assignment aims to provide participants with the opportunity to practice coding in an interview context. You will analyze another person's Assignment 1 submission. Moreover, code reviews are common practice in a software development team. This assignment should give you a taste of the code review process.\n", "\n", - "## Group Size\n", + "## Instructions\n", + "Once you have submitted your A1, you will receive an email from the team with instructions for your A2, including your partner's name and the link to their A1 submission. You only need to review and comment on your partner's A1 submission and don't need to work together with your partner.\n", "\n", - "Each group should have 2 people. You will be assigned a partner\n", + "If you didn't receive the email (also check the junk folder), please reach out to one of the learning support staff via Slack or email.\n", "\n", "## Parts:\n", - "- Part 1: Complete 1 of 3 questions\n", - "- Part 2: Review your partner's Assignment 1 submission\n", - "- Part 3: Perform code review of your partner's assignment 1 by answering the questions below\n", - "- Part 3: Reflect on Assignment 1 and Assignment 2\n", + "- Part 1: Complete 1 of 3 new problems. You are not required to analyze your solution in A2.\n", + "- Part 2: Review your partner's A1 submission by answering a set of questions.\n", + "- Part 3: Reflect and share your experience on A1 and A2.\n", "\n", "## Part 1:\n", "\n", - "_*You will be assigned one of three problems based of your first name. Enter your first name, in all lower case, execute the code below, and that will tell you your assigned problem. Include the output as part of your submission (do not clear the output). The problems are based-off problems from Leetcode.*_" + "Similar to A1, you will be assigned one of three problems based of your first name. **Enter your first name** as the `input_string`, in all lower case, execute the code below, and that will tell you your assigned problem. Include the output as part of your submission (do not clear the output). The problems are based-off problems from Leetcode.\n", + "\n", + "**Note**: you will code your solution in Part 1 this time." ] }, { @@ -39,49 +41,45 @@ " return (hash_int % 3) + 1\n", "input_string = \"your_first_name_here\"\n", "result = hash_to_range(input_string)\n", - "print(result)\n" + "print(f\"Your assigned problem is: {result}\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "
\n", - " Question 1\n", - "\n", - " # Question One: Check Duplicates in Tree\n", - "\n", - " Given the `root` of a binary tree, check whether it is contains a duplicate value. If a duplicate exists, return the duplicate value. If there are multiple duplicates, return the one with the closest distance to the root. If no duplicate exists, return -1.\n", + "## Problem One: Check Duplicates in Tree\n", + "**Description** \n", + "Given the `root` of a binary tree containing non-negative values, check whether it contains a duplicate value. If a duplicate exists, return the duplicate value. If there are multiple duplicates, return the one whose duplicate is closest to the root. If no duplicate exists, return -1.\n", "\n", - " ## Examples\n", + "**Examples**\n", + "* Example 1:\n", "\n", - " ### Example 1\n", + " ![](./images/q1_ex1.png)\n", "\n", - " ![](./images/q1_ex1.png)\n", + " Input: `root = [1, 2, 2, 3, 5, 6, 7]` *What traversal method is this?*\n", "\n", - " Input: `root = [1, 2, 2, 3, 5, 6, 7]` *What traversal method is this?*\n", + " Output: 2\n", "\n", - " Output: 2\n", + "* Example 2:\n", "\n", - " ### Example 2\n", + " ![](./images/q1_ex2.png)\n", "\n", - " ![](./images/q1_ex2.png)\n", + " Input: `root = [1, 10, 2, 3, 10, 12, 12]`\n", "\n", - " Input: `root = [1, 10, 2, 3, 10, 12, 12]`\n", + " Output: 10\n", "\n", - " Output: 10\n", + "* Example 3:\n", "\n", - " ### Example 3\n", + " ![](./images/q1_ex3.png)\n", "\n", - " ![](./images/q1_ex3.png)\n", + " Input: `root = [10, 9, 8, 7]`\n", "\n", - " Input: `root = [10, 9, 8, 7]`\n", + " Output: -1\n", "\n", - " Output: -1\n", + "**Problem 1 Starter Code**\n", "\n", - "
\n", - "\n", - "#### Starter Code for Question 1" + "You may assume that `root` is a binary tree that has been built, i.e., you can access a node/leaf by calling `root.left.right.left.right...`, so you don't have to provide a tree-building function to convert an input list to a binary tree as an object of the `TreeNode` class." ] }, { @@ -97,6 +95,7 @@ "# self.left = left\n", "# self.right = right\n", "def is_duplicate(root: TreeNode) -> int:\n", + " # Code your solution here #\n", " # TODO" ] }, @@ -104,34 +103,31 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "
\n", - " Question 2\n", - "\n", - " # Question Two: Path to Leaves\n", + "## Problem Two: Path to Leaves\n", + "**Description** \n", + "Given the `root` of a binary tree, return all root to leaf paths in any order.\n", "\n", - " Given the `root` of a binary tree, return all root to leaf paths in any order.\n", + "**Examples**\n", "\n", - " ## Examples\n", + "* Example 1:\n", "\n", - " ### Example 1\n", + " ![](./images/q1_ex1.png)\n", "\n", - " ![](./images/q1_ex1.png)\n", + " Input: `root = [1, 2, 2, 3, 5, 6, 7]` *What traversal method is this?*\n", "\n", - " Input: `root = [1, 2, 2, 3, 5, 6, 7]` *What traversal method is this?*\n", + " Output: [[1, 2, 3], [1, 2, 5], [1, 2, 6], [1, 2, 7]]\n", "\n", - " Output: [[1, 2, 3], [1, 2, 5], [1, 2, 6], [1, 2, 7]]\n", + "* Example 2:\n", "\n", - " ### Example 2\n", + " ![](./images/q1_ex3.png)\n", "\n", - " ![](./images/q1_ex3.png)\n", + " Input: `root = [10, 9, 7, 8]`\n", "\n", - " Input: `root = [10, 9, 7, 8]`\n", + " Output: [[10, 7], [10, 9, 8]]\n", "\n", - " Output: [[10, 7], [10, 9, 8]]\n", + "**Problem 2 Starter Code**\n", "\n", - "
\n", - "\n", - "#### Starter Code for Question 2" + "You may assume that `root` is a binary tree that has been built, i.e., you can access a node/leaf by calling `root.left.right.left.right...`. So you don't have to provide a tree-building function to convert an input list to a binary tree as an object of the `TreeNode` class." ] }, { @@ -146,7 +142,9 @@ "# self.val = val\n", "# self.left = left\n", "# self.right = right\n", + "from typing import List\n", "def bt_path(root: TreeNode) -> List[List[int]]:\n", + " # Code your solution here #\n", " # TODO" ] }, @@ -154,36 +152,33 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "
\n", - " Question 3\n", + "## Problem Three: Missing Number in Range\n", + "**Description** \n", + "You are given a list containing `n` non-negative integers in the range `[1, n]`. Return a list of numbers that are missing from the range `[1, n]` in the given list. If there is no missing number, return -1. \n", "\n", - " # Question Three: Missing Number in Range\n", - " \n", - " You are given a list containing `n` integers in the range `[1, n]`. Return a list of numbers that are missing from the range `[1, n]` of the array. If there is no missing number, return -1. Note, all the integers in the list may not be unique.\n", - " \n", - " ## Examples\n", + "**Note**: integers in the list may not be unique.\n", "\n", - " ### Example 1\n", + "**Examples**\n", "\n", - " Input: `lst = [1, 1, 3]`\n", + "* Example 1:\n", "\n", - " Output: [2]\n", + " Input: `lst = [1, 1, 3]`\n", "\n", - " ### Example 2\n", + " Output: [2]\n", "\n", - " Input: `lst = [5,3,2,4,1]`\n", + "* Example 2:\n", "\n", - " Output: [-1]\n", + " Input: `lst = [5,3,2,4,1]`\n", "\n", - " ### Example 3\n", + " Output: -1\n", "\n", - " Input: `lst = [6, 8, 2, 3, 5, 7, 1, 1, 2,10]`\n", + "* Example 3:\n", "\n", - " Output: [4, 9]\n", + " Input: `lst = [6, 8, 2, 3, 5, 7, 1, 1, 2, 10]`\n", "\n", - "
\n", + " Output: [4, 9]\n", "\n", - "#### Starter Code for Question 3\n" + "**Problem 3 Starter Code**" ] }, { @@ -194,31 +189,22 @@ }, "outputs": [], "source": [ + "from typing import List\n", "def missing_num(nums: List) -> int:\n", + " # Code your solution here #\n", " # TODO" ] }, - { - "cell_type": "markdown", - "metadata": { - "jp-MarkdownHeadingCollapsed": true - }, - "source": [ - "## Part 2:\n", - "\n", - "You and your partner must share each other's Assignment 1 submission." - ] - }, { "cell_type": "markdown", "metadata": {}, "source": [ "\n", - "## Part 3:\n", + "## Part 2:\n", "\n", - "Create a Jupyter Notebook, create 6 of the following headings, and complete the following for your partner's assignment 1:\n", + "Please review your partner's A1 submission and answer the following questions based on their assigned problem and solution:\n", "\n", - "- Paraphrase the problem in your own words.\n" + "1. Paraphrase their assigned problem in your own words.\n" ] }, { @@ -235,7 +221,7 @@ "metadata": {}, "source": [ "\n", - "- Create 1 new example that demonstrates you understand the problem. Trace/walkthrough 1 example that your partner made and explain it.\n" + "2. Create 1 new example with corresponding output to demonstrate that you have understood their assigned problem.\n" ] }, { @@ -251,8 +237,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "\n", - "- Copy the solution your partner wrote. \n" + "3. Walkthrough 1 example that your partner made and explain it." ] }, { @@ -269,7 +254,7 @@ "metadata": {}, "source": [ "\n", - "- Explain why their solution works in your own words.\n" + "4. Copy the solution your partner wrote. \n" ] }, { @@ -285,8 +270,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "\n", - "- Explain the problem’s time and space complexity in your own words.\n" + "5. Explain why their solution works in your own words.\n" ] }, { @@ -302,8 +286,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "\n", - "- Critique your partner's solution, including explanation, and if there is anything that should be adjusted.\n" + "6. Explain the time and space complexity of their solution in your own words and identify if they found the correct time and space complexities.\n" ] }, { @@ -319,17 +302,27 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "\n", - "## Part 4:\n", - "\n", - "Please write a 200 word reflection documenting your process from assignment 1, and your presentation and review experience with your partner at the bottom of the Jupyter Notebook under a new heading \"Reflection.\" Again, export this Notebook as pdf.\n" + "7. Suggest if any improvements can be made to your partner's solution." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Your answer here" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "### Reflection" + "\n", + "## Part 3:\n", + "\n", + "Please include a short reflection (max 200 words) to document your process and share your experience when completing A1 and A2.\n", + "\n" ] }, { @@ -370,28 +363,22 @@ "🚨 **Please review our [Assignment Submission Guide](https://github.com/UofT-DSI/onboarding/blob/main/onboarding_documents/submissions.md)** 🚨 for detailed instructions on how to format, branch, and submit your work. Following these guidelines is crucial for your submissions to be evaluated correctly.\n", "\n", "### Submission Parameters:\n", - "* Submission Due Date: `HH:MM AM/PM - DD/MM/YYYY`\n", + "* Submission Due Date: `2026-11-02 11:59PM ET`\n", "* The branch name for your repo should be: `assignment-2`\n", "* What to submit for this assignment:\n", - " * This Jupyter Notebook (assignment_2.ipynb) should be populated and should be the only change in your pull request.\n", + " * This Jupyter Notebook (assignment_2.ipynb) should be populated and should be the **only change** in your pull request.\n", "* What the pull request link should look like for this assignment: `https://github.com//algorithms_and_data_structures/pull/`\n", " * Open a private window in your browser. Copy and paste the link to your pull request into the address bar. Make sure you can see your pull request properly. This helps the technical facilitator and learning support staff review your submission easily.\n", + "* Please **do not** merge your pull request until one of the learning support staff has approved it. Closed or merged pull requests will not be reviewed. If changes are suggested, please follow the instructions in the thread and revise your submission. \n", "\n", "Checklist:\n", "- [ ] Created a branch with the correct naming convention.\n", "- [ ] Ensured that the repository is public.\n", - "- [ ] Reviewed the PR description guidelines and adhered to them.\n", + "- [ ] Reviewed [the PR description guidelines](https://github.com/UofT-DSI/onboarding/blob/main/onboarding_documents/submissions.md#guidelines-for-pull-request-descriptions) and adhered to them.\n", "- [ ] Verify that the link is accessible in a private browser window.\n", "\n", - "If you encounter any difficulties or have questions, please don't hesitate to reach out to our team via our Slack at `#cohort-6-help`. Our Technical Facilitators and Learning Support staff are here to help you navigate any challenges.\n" + "If you encounter any difficulties or have questions, please don't hesitate to reach out to our team via our Slack at `#mlf2-help`. Our Technical Facilitators and Learning Support staff are here to help you navigate any challenges.\n" ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": { From c1fea5c27630c57073170849b263ec13b87536cc Mon Sep 17 00:00:00 2001 From: Tianyi Liu Date: Mon, 19 Oct 2026 20:45:05 +0800 Subject: [PATCH 3/6] Update info for MLF2 --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 96565a75..58ce9a24 100644 --- a/README.md +++ b/README.md @@ -35,10 +35,10 @@ By the end of the module, participants will be able to: ## Contacts -**Questions can be submitted to the _#mlf1-help_ channel on Slack** +**Questions can be submitted to the _#mlf2-help_ channel on Slack** * Technical Facilitator: **{Fred Song}**. Messages to the Technical Facilitator can be sent on Slack. -* Learning Support Staff: **{Tiyani and E.Fantinatti}**. Messages to the Learning Support Staff can be sent on Slack. +* Learning Support Staff: **{Tianyi Liu}**. Messages to the Learning Support Staff can be sent on Slack. ## Delivery of the Learning Module @@ -77,8 +77,8 @@ Participants should review the [Assignment Submission Guide](https://github.com/ | Assessment | Description | Due Date | | ----------------------------------------------------------- | ------------------- | ------------------------------- | -| [Assignment 1](./02_activities/assignments/assignment_1.ipynb) | DSA coding practice | Monday, June 22 2026 (11:59pm) | -| [Assignment 2](./02_activities/assignments/assignment_2.ipynb) | Mock interview | Monday, June 29 2026 (11:59pm) | +| [Assignment 1](./02_activities/assignments/assignment_1.ipynb) | DSA coding practice | Monday, October 26th 2026 (11:59pm) | +| [Assignment 2](./02_activities/assignments/assignment_2.ipynb) | Mock interview | Monday, November 2nd 2026 (11:59pm) | ## Resources From 3779a345253fa1ce60b7856caaad62dc71890406 Mon Sep 17 00:00:00 2001 From: Tianyi Liu Date: Mon, 19 Oct 2026 20:45:15 +0800 Subject: [PATCH 4/6] Update toml file --- pyproject.toml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 79798212..a31fe66e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,12 +1,10 @@ [project] -name = "sampling-env" +name = "algo-env" version = "0.1.0" requires-python = ">=3.11" dependencies = [ "ipykernel>=6.30.1", - "cache-em-all>=0.2.2", - "joblib>=1.5.2", - "numpy>=2.3.3", - "pandas>=2.3.2", - "pulp>=3.2.2", + "ipython>=9.5.0", + "jupyter>=1.1.1", + "jupyterlab>=4.3.0" ] From 463d256bcd3229622422ebdc6c41adbc6072df01 Mon Sep 17 00:00:00 2001 From: Tianyi Liu Date: Mon, 19 Oct 2026 22:26:27 +0800 Subject: [PATCH 5/6] Update assignments for clarity --- 02_activities/assignments/assignment_1.ipynb | 30 ++++++++++---------- 02_activities/assignments/assignment_2.ipynb | 24 ++++++++-------- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/02_activities/assignments/assignment_1.ipynb b/02_activities/assignments/assignment_1.ipynb index b548e253..4969651f 100644 --- a/02_activities/assignments/assignment_1.ipynb +++ b/02_activities/assignments/assignment_1.ipynb @@ -14,16 +14,16 @@ "Please complete this assignment individually.\n", "\n", "## Parts:\n", - "- Part 1: Figure out the problem you have been assigned and understand the problem description. You are only required to solve **one** out of the three problems in this notebook.\n", - "- Part 2: Answer a set of questions about your assigned problem (including solving it).\n", + "- Part 1: Use the provided function to identify your assigned problem. You are only required to solve one out of the three problems in this notebook.\n", + "- Part 2: Answer a set of questions about your assigned problem.\n", "\n", "## Part 1:\n", "\n", - "You will be assigned one of three problems based of your first name. **Enter your first name** as the `input_string`, in all lower case, execute the code below, and that will tell you your assigned problem. Include the output as part of your submission (do not clear the output). The problems are based-off problems from Leetcode.\n", + "You will be assigned one of three problems based of your first name. Enter your first name as the `input_string`, in all lower case, execute the code below, and that will tell you your assigned problem. Include the output as part of your submission (do not clear the output). The problems are based-off problems from Leetcode.\n", "\n", "💡 We are using a hash function here.\n", "\n", - "**Note**: you will code your solution in Part 2.\n" + "Note: you will code your solution in Part 2.\n" ] }, { @@ -49,7 +49,7 @@ "source": [ "## Problem One: First Duplicate in List\n", "**Description** \n", - "Given a list of non-negative integers, return the **first value that appears more than once**. If there are multiple duplicates, return the one whose duplicate appears **first** in the list (see example 4). If no duplicate exists, return `-1`.\n", + "Given a list of non-negative integers, return the first value that appears more than once. If there are multiple duplicates, return the one whose duplicate appears first in the list (see example 4). If no duplicate exists, return -1.\n", "\n", "**Examples**\n", "* Example 1: one duplicate\n", @@ -68,10 +68,10 @@ " Output: 4\n", " ```\n", "* Example 4: multiple duplicates \n", - "```python\n", - "Input: nums = [0, 1, 2, 1, 0]\n", - "Output: 1\n", - "```\n", + " ```python\n", + " Input: nums = [0, 1, 2, 1, 0]\n", + " Output: 1\n", + " ```\n", "\n", "**Problem 1 Starter Code**" ] @@ -95,7 +95,7 @@ "source": [ "## Problem Two: Valid Bracket Sequence\n", "**Description** \n", - "Given a string containing only the characters `'('`, `')'`, `'{'`, `'}'`, `'['`, and `']'`, determine if the input string is a **valid bracket sequence**.\n", + "Given a string containing only the characters `'('`, `')'`, `'{'`, `'}'`, `'['`, and `']'`, determine if the input string is a valid bracket sequence.\n", "\n", "A sequence is valid if:\n", "- Open brackets are closed by the same type of brackets, and\n", @@ -196,7 +196,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "2. In your assigned problem, there are a few provided examples with their expected outputs. Create 2 new examples with corresponding outputs for the problem you have been assigned to demonstrate that you have understood the problem." + "2. In your assigned problem, there are a few provided examples with their expected outputs. Create two new examples with corresponding outputs for your assigned problem to demonstrate that you have understood the problem." ] }, { @@ -212,7 +212,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "3. Based on the provided starter code, code the solution to your assigned problem here in Python. **Note**: each problem can be solved more simply if you use an abstract data type that is suitable for that problem. Try to find the solution with best time and space complexity." + "3. Based on the provided starter code, code the solution to your assigned problem here in Python. Note: each problem can be solved more simply if you use an abstract data type that is suitable for that problem. Try to find the solution with best time and space complexity." ] }, { @@ -263,7 +263,7 @@ "metadata": {}, "source": [ "\n", - "6. Describe an alternative solution to your problem in plain words, e.g., with a different data structure or time/space complexities. **Note**: you don't need to code your alternative solution, but a classmate reading this should be able to code it based on your description.\n" + "6. Describe an alternative solution to your problem in plain words, e.g., with a different data structure or time/space complexities. Note: you don't need to code your alternative solution, but a classmate reading this should be able to code it based on your description.\n" ] }, { @@ -304,10 +304,10 @@ "* Submission Due Date: `2026-10-26 11:59PM ET`\n", "* The branch name for your repo should be: `assignment-1`\n", "* What to submit for this assignment:\n", - " * This Jupyter Notebook (assignment_1.ipynb) should be populated and should be the **only change** in your pull request.\n", + " * This Jupyter Notebook (assignment_1.ipynb) should be populated and should be the only change in your pull request.\n", "* What the pull request link should look like for this assignment: `https://github.com//algorithms_and_data_structures/pull/`\n", " * Open a private window in your browser. Copy and paste the link to your pull request into the address bar. Make sure you can see your pull request properly. This helps the technical facilitator and learning support staff review your submission easily.\n", - "* Please **do not** merge your pull request until one of the learning support staff has approved it. Closed or merged pull requests will not be reviewed. If changes are suggested, please follow the instructions in the thread and revise your submission. \n", + "* Please do not merge your pull request until one of the learning support staff has approved it. Closed or merged pull requests will not be reviewed. If changes are suggested, please follow the instructions in the thread and revise your submission. \n", "\n", "Checklist:\n", "- [ ] Create a branch called `assignment-1`.\n", diff --git a/02_activities/assignments/assignment_2.ipynb b/02_activities/assignments/assignment_2.ipynb index 8fb20e3c..1a0e6b8f 100644 --- a/02_activities/assignments/assignment_2.ipynb +++ b/02_activities/assignments/assignment_2.ipynb @@ -11,20 +11,20 @@ "This assignment aims to provide participants with the opportunity to practice coding in an interview context. You will analyze another person's Assignment 1 submission. Moreover, code reviews are common practice in a software development team. This assignment should give you a taste of the code review process.\n", "\n", "## Instructions\n", - "Once you have submitted your A1, you will receive an email from the team with instructions for your A2, including your partner's name and the link to their A1 submission. You only need to review and comment on your partner's A1 submission and don't need to work together with your partner.\n", + "Once you have submitted your A1, you will receive an email from the team shortly with instructions for your A2, including your partner's name and the link to their A1 submission. You only need to review and comment on your partner's A1 submission and don't need to work together with your partner for your A2.\n", "\n", "If you didn't receive the email (also check the junk folder), please reach out to one of the learning support staff via Slack or email.\n", "\n", "## Parts:\n", - "- Part 1: Complete 1 of 3 new problems. You are not required to analyze your solution in A2.\n", + "- Part 1: Complete one of three new problems. You are not required to analyze your solution in A2.\n", "- Part 2: Review your partner's A1 submission by answering a set of questions.\n", "- Part 3: Reflect and share your experience on A1 and A2.\n", "\n", "## Part 1:\n", "\n", - "Similar to A1, you will be assigned one of three problems based of your first name. **Enter your first name** as the `input_string`, in all lower case, execute the code below, and that will tell you your assigned problem. Include the output as part of your submission (do not clear the output). The problems are based-off problems from Leetcode.\n", + "Similar to A1, you will be assigned one of three problems based of your first name. Enter your first name as the `input_string`, in all lower case, execute the code below, and that will tell you your assigned problem. Include the output as part of your submission (do not clear the output). The problems are based-off problems from Leetcode.\n", "\n", - "**Note**: you will code your solution in Part 1 this time." + "Note: you will code your solution in Part 1 this time." ] }, { @@ -127,7 +127,7 @@ "\n", "**Problem 2 Starter Code**\n", "\n", - "You may assume that `root` is a binary tree that has been built, i.e., you can access a node/leaf by calling `root.left.right.left.right...`. So you don't have to provide a tree-building function to convert an input list to a binary tree as an object of the `TreeNode` class." + "You may assume that `root` is a binary tree that has been built, i.e., you can access a node/leaf by calling `root.left.right.left.right...`, so you don't have to provide a tree-building function to convert an input list to a binary tree as an object of the `TreeNode` class." ] }, { @@ -221,7 +221,7 @@ "metadata": {}, "source": [ "\n", - "2. Create 1 new example with corresponding output to demonstrate that you have understood their assigned problem.\n" + "2. Create one new example with corresponding output to demonstrate that you have understood their assigned problem.\n" ] }, { @@ -237,7 +237,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "3. Walkthrough 1 example that your partner made and explain it." + "3. Walkthrough one example that your partner made and explain it." ] }, { @@ -366,15 +366,15 @@ "* Submission Due Date: `2026-11-02 11:59PM ET`\n", "* The branch name for your repo should be: `assignment-2`\n", "* What to submit for this assignment:\n", - " * This Jupyter Notebook (assignment_2.ipynb) should be populated and should be the **only change** in your pull request.\n", + " * This Jupyter Notebook (assignment_2.ipynb) should be populated and should be the only change in your pull request.\n", "* What the pull request link should look like for this assignment: `https://github.com//algorithms_and_data_structures/pull/`\n", " * Open a private window in your browser. Copy and paste the link to your pull request into the address bar. Make sure you can see your pull request properly. This helps the technical facilitator and learning support staff review your submission easily.\n", - "* Please **do not** merge your pull request until one of the learning support staff has approved it. Closed or merged pull requests will not be reviewed. If changes are suggested, please follow the instructions in the thread and revise your submission. \n", + "* Please do not merge your pull request until one of the learning support staff has approved it. Closed or merged pull requests will not be reviewed. If changes are suggested, please follow the instructions in the thread and revise your submission. \n", "\n", "Checklist:\n", - "- [ ] Created a branch with the correct naming convention.\n", - "- [ ] Ensured that the repository is public.\n", - "- [ ] Reviewed [the PR description guidelines](https://github.com/UofT-DSI/onboarding/blob/main/onboarding_documents/submissions.md#guidelines-for-pull-request-descriptions) and adhered to them.\n", + "- [ ] Create a branch called `assignment-2`.\n", + "- [ ] Ensure that the repository is public.\n", + "- [ ] Review [the PR description guidelines](https://github.com/UofT-DSI/onboarding/blob/main/onboarding_documents/submissions.md#guidelines-for-pull-request-descriptions) and adhere to them.\n", "- [ ] Verify that the link is accessible in a private browser window.\n", "\n", "If you encounter any difficulties or have questions, please don't hesitate to reach out to our team via our Slack at `#mlf2-help`. Our Technical Facilitators and Learning Support staff are here to help you navigate any challenges.\n" From a47a505699fa631c2173da49a70e7a11101bf38f Mon Sep 17 00:00:00 2001 From: Tianyi Liu Date: Mon, 19 Oct 2026 22:26:47 +0800 Subject: [PATCH 6/6] Update README for MLF2 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 58ce9a24..fd66ba56 100644 --- a/README.md +++ b/README.md @@ -136,7 +136,7 @@ The course content, slides, and recommended problems follow these two textbooks. - Try searching in the DSI Microcredentials Slack help channel for whether a similar query has been posted - If the question has not yet been answered, post your question! - Describe your overall goals, the context, and the specific details of what you were trying to accomplish - - Make sure to **copy and paste** your code, your error message + - Make sure to copy and paste your code, your error message - Copying and pasting helps: 1. Your peers and teaching team quickly try out your code 2. Others to find your question in the future